View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Screen Updating For Status Bar

I can't recreate your problem. IOW the status bar will update no matter what
you do, or don't do, even if screenupdating is disabled.

Try the following 20 second loop, switch app's back & forth hiding revealing
windows etc.

Sub test()
Dim d As Date
Dim db As Date, Begin As Date, Current As Date
Const SEC As Date = 1 / 24 / 60 / 60

' Application.ScreenUpdating = False

Begin = Now

Do ' loop for 20 seconds updating the statusbar
Current = Now
If Application.StatusBar < CStr(Current) Then
Application.StatusBar = CStr(Current)
End If
Loop Until Current (Begin + 20 * SEC)


MsgBox "done"
Application.StatusBar = False
Application.ScreenUpdating = True

End Sub

Regards,
Peter T


"DownThePaint" wrote in message
...
Hi Mike;

I am doing that with the code now. As long as the user keeps the
application focus on Excel the updating works but if they say, go check

email
and then come back when Excel regains focus the status bar does not update
even thought the routine is successfully running in the back ground.

Thanks,

"Mike H" wrote:

As long as you pick up the value of XXXX in a variable as your code

loops
then try

Application.StatusBar = xxxx



Mike

"DownThePaint" wrote:

I have a VBA routine that keeps the user updated on progress by

changing the
status bar (Processing xxx Row of yyyy). When the user multi tasks

and goes
to do something else and then comes back to Excel the status bar

updating is
frozen. I have the Application.ScreenUpdating set to TRUE.

Any Ideas?