Thread: Progress Bar
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
RCW RCW is offline
external usenet poster
 
Posts: 9
Default Progress Bar

If the user is knowledgable, I like to use an actual message that says what
the macro is doing now. Insert code like in this demo:


Sub ReportProgress()
'
' Gives the user info on macro progress
'
' Change the caption in the title bar.
' Capture the current color of the gridlines in x, then change it
' Add more caption changes to report the progress as needed
' At the end of the macro, set gridline color back to original and
' the caption back to Microsoft Excel
' Add BEEP to let user know the macro is done
'
'
Application.Caption = " A macro is moving data to the Summary Sheet "

x = ActiveWindow.GridlineColorIndex
ActiveWindow.GridlineColor = QBColor(9)

Application.ScreenUpdating = False
' your macro code would be here
Application.ScreenUpdating = True
ActiveWindow.GridlineColorIndex = x
Application.Caption = "Microsoft Excel"


BEEP: BEEP

End Sub



"leerem" wrote:

Whilst macros are working and if there are call commands within these
routines the macro could go on for apporx 60 secs, how can I either install a
progress bar or allow messages to appear on a Userform. I tried useing a
userform but when this was shown the macro stopped until there was some sort
of imput from the user. how can I get around this.
Many thanks in anticipation