HolidaysPlan, SchedulerCmdTarget Property

Syntax

HolidaysPlan = _Variant

Description

This property allows you to set or read the current weekly hour plan of a "Daily plan" scheduler. The hourly planning managed by this function is for the holidays, whereas the normal plan is managed with the "Plan" method.

 

Caution. When the Scheduler is displayed through the "Scheduler Window", after having modified the planning file, you will need to use the "Scheduler Window" object's "Cancel" method to refresh the  data displayed.

 

Parameter

Description

None

None

 

Result

Variant

 

Example 1:

Option Explicit

Public Sub Click()

Dim objScheduler As SchedulerCmdTarget

Dim bHours() As Byte

 

If objScheduler Is Nothing Then Set objScheduler = GetScheduler("Scheduler")

 

Erase bHours

For i = 0 To UBound(objScheduler.HolidaysPlan)

ReDim Preserve bHours(i)

SetVariableValue "Plan:Byte" & CStr(i), 255

bHours(i) = 255

Next

objScheduler.HolidaysPlan = CVar(bHours)

End Sub

 

Example 2:

Option Explicit

Public Sub Click()

Dim objScheduler As SchedulerCmdTarget

Dim sPlan As String

 

If objScheduler Is Nothing Then Set objScheduler = GetScheduler("Scheduler")

 

For i = 0 To UBound(objScheduler.HolidaysPlan)

If sPlan <> "" Then sPlan = sPlan & ", "

sPlan = sPlan & objScheduler.HolidaysPlan(i)

Next

MsgBox sPlan, vbOkOnly, "Plan"

End Sub

 

See Also