Vba code to stop screen updating
Remember to set the Screen Updating property back to True when your macro ends.
This example demonstrates how turning off screen updating can make your code run faster.
A User Form will not be refreshed in some cases, because Do Events will fire the events; however, Repaint will update the User Form and the user will see the changes on the screen even when another event immediately follows the previous event.
In the User Form code it is as simple as: This is not directly answering your question at all, but simply providing an alternative.
I have a slide that includes a (inserted) chart and an inserted Excel worksheet object.
I can open each object to update the underlying data, but I can't do it without the objects actually opening on screen.
But the screen doesn't refresh, or stops refreshing at some point (e.g. The task eventually completes but the progress bar is useless. For i=1 to imax ' imax is usually 30 or so fraction Done=cdbl(i)/cdbl(imax) Application.Excel Options), in the Excel Options dialog box, click Advanced in the left pane, and then uncheck Ask to update automatic links under General section, see screenshot: 2.Then click OK to close this dialog, when you open this workbook next time, the links are automatically updated, and additionally, no message appears.I've found in the many long Excel calculations most of the time waiting is having Excel update values on the screen.If this is the case, you could insert the following code at the front of your sub: I've found that this often speeds up whatever code I'm working with so much that having to alert the user to the progress is unnecessary.