See also ProgressForm documentation under Automation > Automated Miscellaneous.
The Accredo.ProgressForm object is used to provide progress feedback to users when and automated process is running.
The object supports a ProgressType of Bar or Status. ProgressType is an integer property, 0 = Bar and 1 = Status.
After creating an instance of Accredo.ProgressForm, set the ProgressType property, then use the following pattern:
ProgressForm.Min = minValue ' if using Bar type
ProgressForm.Max = maxValue ' if using Bar type
ProgressForm.Start
// loop that does some work
do until table.EOF
ProgressForm.Step ' if using Bar Type
ProgressForm.Status = "Some status update" 'if using status type
ProgressForm.Tick ' if using Status type
table.next
loop
ProgressForm.Finished
const progressTypeBar = 0
const progressTypeStatus = 1
const c_Min = 1
const c_Max = 80000
Dim Y as Number, Z as Number
Sub DoWork
Z = Y * 2
End Sub
Dim frmProgress as Object
frmProgress = CreateObject("Accredo.ProgressForm")
frmProgress.ProgressType = progressTypeBar
frmProgress.CancelAllowed = True
frmProgress.AbortOnCancel = True
frmPRogress.Min = c_Min
frmProgress.Max = c_Max
frmProgress.Start
For I = c_Min to c_Max
y = I
DoWork()
frmProgress.Step
Next I
frmProgress.Finished
msgbox("Finished")
Example for Progress Status const progressTypeBar = 0
const progressTypeStatus = 1
const c_Min = 1
const c_Max = 80000
Dim Y as Number, Z as Number
Sub DoWork
Z = Y * 2
End Sub
Dim frmProgress as Object
frmProgress = CreateObject("Accredo.ProgressForm")
frmProgress.ProgressType = progressTypeStatus
frmProgress.CancelAllowed = True
frmProgress.AbortOnCancel = False
frmProgress.Start
For I = c_Min to c_Max
y = I
frmProgress.Status = "Y = " & Y
DoWork()
frmProgress.Tick
Next I
frmProgress.Finished
msgbox("Finished")