Simple Question on Screenupdating

ercedwards

Board Regular
Joined
Apr 27, 2013
Messages
125
No biggie here.

While some of my macros are running, I have ScreenUpdating=false . I update the progress for the user by changing the Caption on a Command Button
and then turn on Updating and then turn it off. It works just fine.

I was wondering, however, if there was a way around turning ScreenUpdating on and off by somehow just forcing the Caption to refresh while Updating is still off.

Thanks much for any suggestions.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Re: Simple QUestion on Screenupdating

No but you could use the Staus Bar instead

Put this silly code in a standard module and run
- the status bar is updated constantly but cell A1 is only updated once (despite the value changing 53,000 times)

Code:
Sub SBar()
Dim oldStatusBar, a, x, msg
Application.ScreenUpdating = False

With Application
    oldStatusBar = .DisplayStatusBar
    .DisplayStatusBar = True
    .StatusBar = "Please be patient..."
        For x = 1 To 3000
            Range("A1") = Range("a1") + 1
        Next
    .StatusBar = False
    .DisplayStatusBar = oldStatusBar


    oldStatusBar = .DisplayStatusBar
    .DisplayStatusBar = True
    .StatusBar = "Please be VERY patient..."
        For x = 1 To 10
            msg = msg & ">"
            For a = 1 To 5000
                Range("A1") = Range("a1") + 1
            Next a
            .StatusBar = msg
        Next
    .StatusBar = False
    .DisplayStatusBar = oldStatusBar
End With
End Sub
 
Upvote 0
Re: Simple QUestion on Screenupdating

Thanks for the suggestion.

Because I am running FullScreen, the Status Bar is not visible so I can't use it for this purpose.

Cheers
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top