Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

ScreenUpdating = FALSE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cinque Terra - 16 Apr 2008 23:11 GMT
I would like to turn off screen updating while my sub runs.  If I turn off
screen updating within the sub, it does not turn off.  If I turn off screen
updating in a second sub that calls the first, it turns off.

Any thoughts why I have to use the 2nd sub - I would prefer to accomplish
this within a single sub.

Sub Aggregate()
Dim ...
   Application.EnableEvents = False
   Application.ScreenUpdating = False
        Load frm_Offsets
             "do VBA stuff"
   Application.ScreenUpdating = True
   Application.EnableEvents = True
End Sub

Sub Spread_test()
   Application.ScreenUpdating = False
   Call Aggregate
End Sub

Thanks in advance!
Jim Rech - 17 Apr 2008 00:24 GMT
It should work the same in either case.  There's got to be something else
going on.  Anyway the ScreenUpdating in Aggregate is getting skipped?  Can
you repro this in a simpler example?

Signature

Jim

>I would like to turn off screen updating while my sub runs.  If I turn off
> screen updating within the sub, it does not turn off.  If I turn off
[quoted text clipped - 20 lines]
>
> Thanks in advance!
Gary Keramidas - 17 Apr 2008 01:43 GMT
it's hard to say. try adding something like this and see if it's ever set to
false

Debug.Print Application.ScreenUpdating
Application.EnableEvents = False
Application.ScreenUpdating = False
Debug.Print Application.ScreenUpdating

Signature

Gary

>I would like to turn off screen updating while my sub runs.  If I turn off
> screen updating within the sub, it does not turn off.  If I turn off screen
[quoted text clipped - 19 lines]
>
> Thanks in advance!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.