Msg Box to Appear??

  • Thread starter Thread starter hce
  • Start date Start date
H

hce

Hi

Can anyone please show me how i can get a message box to appear onc
the macro is activated and disappear once the macro is done...? th
macro is activated via the command button on a useform... currently,
am using the status bar to display the message i want to show but it i
not obvious enough... i have also tried to use the progress applet a
shown in pearson's website but due to my lack of vb knowledge i wasn'
able to modify the progress applet to run according to my macro...
would really appreciate any help/advice provided...

cheer
 
add a userform witha lable...the default is label1.
add the forrlowing sub to a standard module...

Sub MyButtonCode()

Dim i As Long
Dim t As Long
UserForm1.Show False

For i = 1 To 1000
t = Timer
UserForm1.Label1.Caption = i
UserForm1.Repaint
Do
doevents
Loop Until Timer > (t + 1)

Next

End Sub


the code loads the form in mode-less ...that means that the code continues
while the form is visible
 
Just some added information.

A msgbox is modal - it holds the focus and no code runs while it is
displayed, so a msgbox will not work for this.
 
Back
Top