Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Flash Messages while a long process is going?

Status
Not open for further replies.

snehakevin

Technical User
Sep 14, 2003
33
0
0
SG
I am doing a lengthy process, which creates few files and does some postings which may take more than a minute,
I want to keep flashing some messages to the user, or some process bar which tells the user some thing is happening,
How can I do this?

Can anyone help me....Thank you
 
Try using DoEvents(). Basically it allows other things to run. So what you could do for example is...

Sub Form_Load()
Timer1.Interval = 1000
Call LengthyProcess
Timer1.Interval = 0
End Sub

Sub LengthyProcess()
Dim i As Integer
For i = 0 to 10000
'Make File or do something
DoEvents()
Next i
End Sub

Sub Timer1_Timer()
Msgbox "Still here"
End Sub

The DoEvents line gives processing time to other things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top