From the VBA IntelliSense list, choose “Value” property to get the value from the mentioned cell. Now the variable “CellValue” holds the value from the cell A1. Show this variable value in the message box in VBA. Ok, run the code and see the result in a message box.
Posts by Jimmywick
-
-
One of way - temporary AppointmentItem
Code
Display MoreFunction GetRecTaskDates(dStart As Date, dEnd As Date, objTask As Object) Dim objTempApnt As Object Dim objTaskPatt As Object Dim objTempPatt As Object Dim objCurApnt As Object Dim dCurDate As Date Dim arrResult() Dim iCount As Integer Dim n As Integer Dim lRecType As Long Set objTempApnt = objTask.Application.CreateItem(olAppointmentItem) objTempApnt.Subject = "temp" Set objTempPatt = objTempApnt.GetRecurrencePattern Set objTaskPatt = objTask.GetRecurrencePattern With objTempPatt .RecurrenceType = objTaskPatt.RecurrenceType lRecType = .RecurrenceType If objTaskPatt.DayOfMonth Then .DayOfMonth = objTaskPatt.DayOfMonth If lRecType = 1 Or lRecType = 3 Or lRecType = 6 Then .DayOfWeekMask = objTaskPatt.DayOfWeekMask .StartTime = #9:00:00 AM# .EndTime = #10:00:00 AM# .PatternStartDate = objTaskPatt.PatternStartDate If objTaskPatt.Interval Then .Interval = objTaskPatt.Interval If objTaskPatt.NoEndDate Then .NoEndDate = objTaskPatt.NoEndDate Else .Occurrences = objTaskPatt.Occurrences .PatternEndDate = objTaskPatt.PatternEndDate End If If lRecType >= 5 Then .MonthOfYear = objTaskPatt.MonthOfYear If lRecType = 3 Or lRecType = 6 Then .Instance = objTaskPatt.Instance End With objTempApnt.Save For dCurDate = dStart To dEnd On Error Resume Next Set objCurApnt = objTempPatt.GetOccurrence(dCurDate + objTempPatt.StartTime) If Err.Number = 0 Then n = n + 1 ReDim Preserve arrResult(1 To n) arrResult(n) = dCurDate End If Err.Clear Next dCurDate On Error GoTo 0 objTempApnt.ClearRecurrencePattern objTempApnt.Delete If n > 0 Then GetRecTaskDates = arrResult End Function
-
-
Select the row or column that you want to move or copy. or press Ctrl+C. Select the upper-left cell of the paste area or the cell where you want to paste the value, cell format, or formula.
-
1. Select your specific object which you want to prevent from resizing or moving, and click Format in the ribbon, then click button in the Size group, see screenshot: 2. In the popped out pane, click Size & Properties icon, and check Don’t move or size with cells option under PROPERTIES section.
J wick
-
In the Power Pivot window, select a table that contains dates. In the Design tab, click Mark as Date Table. In the dialog box, select a column that contains unique values, with no blank values. Click OK. To use advanced date filters Navigate to a PivotTable or PivotChart in the same workbook
-
Excel Program is Freezing Trick
1. Start Excel in Safe Mode Full steps Trick
2. Update Excel (Office suite) Full steps Trick
3. Repair Office installation Full steps Trick
4. Remove broken add-ins Full steps Trick
5. Stop or wait process in use Full steps Trick
6. Modify advanced settings Full steps Trick
7. Increase C drive space.
Regards,
J Wick