Task

 

Remarks Properties Methods Events Samples

ED
avaliable
RT
avaliable

Remarks:Top

A task is a VisualBasicScript file and can be executed over the Tasks/Task object model.

Here is a sample how to configure a task to run only once and starts event triggered:


Tasks can also be configured cyclic, then VBA is not needed to use them...

Properties:Top

ActualCycleTime CountVariable CycleTime
ErrorNumber ErrorString Name
Parent Priority Status
Type    

Methods:Top

DynPropertiesEnum[GET] DynProperties[GET] DynProperties[PUT]
ItemVariable MemValue[GET] MemValue[PUT]
Run Sleep StartTimer
Stop StopTimer Value[GET]
Value[PUT]    

Events:Top

Exit Init Main
Timer    

Samples:Top

Public Sub StartTask()
	Dim zTask As Task
	
	'get task by its name...
	Set zTask = thisProject.Tasks.Item("Task1")

	'get task properties...
	Debug.Print "CountVariable:   " & zTask.CountVariable
	Debug.Print "ActualCycleTime: " & zTask.ActualCycleTime
	Debug.Print "CycleTime:	 " & zTask.CycleTime
	Debug.Print "ErrorNumber:	 " & zTask.ErrorNumber
	Debug.Print "ErrorString:	 " & zTask.ErrorString
	Debug.Print "Priority:		" & zTask.Priority
	Debug.Print "Status:		" & zTask.Status

	'run task
	zTask.Run

End Sub