LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default ScreenUpdating automatically resets to True

It's nothing to do with activating a worksheet, it is simply local to the
procedure it is set in. When that procedure ends, it reverts back to True,
as stated in the online help.

--

HTH

Bob Phillips

"onedaywhen" wrote in message
m...
The ScreenUpdating property seems to implicitly/automatically be set
to true when a worksheet is activated. Is this expected behaviour? I
would expect the value of ScreenUpdating to persist until *I* change
it.

Here's some code that demonstrates what I mean (paste it into all
worksheet code modules):

Private Sub Worksheet_Deactivate()
With Application
.ScreenUpdating = False
.Cursor = xlWait
End With
End Sub

Private Sub Worksheet_Activate()
With Application
Stop ' ScreenUpdating should be False
.ScreenUpdating = True
.Cursor = xlDefault
End With
End Sub

When the Stop is encountered ScreenUpdating should be false; it was
set to false when the cursor was changed to the hourglass. However, at
the Stop I have the hourglass cursor but ScreenUpdating is now true.

Sure, I can turn it off again but I get a flicker each time I toggle
this property. And because in reality I'm using the
_Activate/_Deactivate events to run initialize/cleanup code, possibly
reactivating the worksheets in the process, this is adding up to a lot
of flickering ... which is of course what I was trying to eliminate by
turning ScreenUpdating off!

Is this something I've got to learn to live with or is it likely I'm
doing something wrong?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
about screenupdating baha Excel Discussion (Misc queries) 0 March 25th 10 06:16 AM
Automatically fill in TRUE values Ron St Jean Excel Discussion (Misc queries) 2 November 19th 08 06:35 PM
Excel automatically resets default save file format [email protected] Excel Discussion (Misc queries) 1 October 17th 07 06:38 PM
Screenupdating Problems Trent Excel Discussion (Misc queries) 0 April 28th 06 07:03 AM
What does ScreenUpdating = False do? Judy Ward Excel Worksheet Functions 5 July 9th 05 09:25 AM


All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"