Simple Dumb Question: App.ScreenUpdating

  • Thread starter Thread starter Steph
  • Start date Start date
S

Steph

Hi everyone. I have a question about Application.ScreenUpdating. I run a
bunch of subs from one main sub:

Sub Main()
Application.ScreenUpdating=False
sub1
sub2
sub3
Application.ScreenUpdating=True
end sub

Does the Application.ScreenUpdating carry through to all 3 subs that are
called from the Main, or should I have that in each of the 3 subs? Thank
you!!
 
You could check it:

Public Sub CheckSU()
Application.ScreenUpdating = False
test1
test2
Application.ScreenUpdating = True
End Sub

Public Sub test1()
MsgBox "test1: " & Application.ScreenUpdating
End Sub
Public Sub test2()
MsgBox "test2: " & Application.ScreenUpdating
End Sub
 
Should carry through.

There is a possibility that your subs call a function that turns it back on,
but otherwise it should carry through.
 
Thanks guys. The test showed that it does in fact carry through. The subs
that the main calls do a lot of opening and closing of files. So I still
see the screen popping back and forth as files are opened and closed. I
guess there's no way to prevent that from happening....at least
App.ScreenUpdating doesn't seem to prevent it.
 
I have opened and closed files with screen updating turned off many times
and it did not affect the setting nor did I see any activity. So doing
that alone should not affect it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top