Link to home
Start Free TrialLog in
Avatar of odonovanpm
odonovanpm

asked on

Progress Bar for Loop

I have a loop that send out customised SMS messages to clients, as this loop can take anything from 20 minutes to 1 hour I need to integrate a progress bar to monitor the progress of the loop... Ideally I would like to place it in the Status Bar of the MDI Parent Form... Any ideas?
Avatar of Thandava Vallepalli
Thandava Vallepalli
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of Ramesh Srinivas
Ramesh Srinivas
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In your Child form

Public Event StatusChange (Count as long, Total as long)


Sub RunForLoop ()
Dim SomeArray(8) as String

for c = 0 to ubound(someArray)
        'do something
        Raiseevent StatusChange (c,ubound(someArray))
        msgbox("You Should See " & str(c+1) & " bar(s)"
next
end sub

In your Parent form

Sub ChildFormStatusChangeEvent ( count as long, total as long) handles Childform1.StatusChange

progressbar1.Maximum = Total
Progressbar1.value = count

end sub


Regards,
Corey