LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Why oh why!!!

AFAIK, setting to true is pointless, apart from the sense of documentation:
- If the routines completes, even due to the use of an error handle,
ScreenUpdating is set to True
- If an unhandled error occurs and you enter Break Mode, ScreenUpdating is
set to True

NickHK

"WhytheQ" wrote in message
oups.com...
Thanks for all the help.
I suppose the only occassion when it's necessary to tun it back on is
if the code doesn't finish and an error has occured? e.g

'====================
on error goto erroroccured:

code here

erroroccured:
application.screenupdating = true
'====================


.....or isn't the above even necessary?

J




On 17 Apr, 19:10, Jay wrote:
HiWhytheQ-

Yours is a commonly asked question. Notice that a QuickWatch will display
'True' when ScreenUpdating=False as will hovering the cursor over the
ScreenUpdating keyword when in BreakMode. As merjet and Jim suggest, this
behavior is inconsequential as the value does change per your

specifications.
The real proof of whether it is working is if it suppresses updating when
you want it to.

I don't know why, but something internal to the VBA/E environment results

in
the behavior you describe. Search for "application.screenupdating = false
not working" for other posts on the same subject. To supplement the code
provided by merjet, here is another procedure (originally provided by

Norman
Jones in this DG) that demonstrates that the value of ScreenUpdating truly
does change as expected.


'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''*
'
Public Sub TestIt()
Const sStr = "ScreenUpdating is on = "
With Application
.ScreenUpdating = False
MsgBox sStr & .ScreenUpdating
.ScreenUpdating = True
MsgBox sStr & .ScreenUpdating
End With
End Sub

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''*
'
---
Jay



"WhytheQ" wrote:
Has anybody ever experienced this before?
Has anybody got a clue how to fix it?


Somehow something has happened to my Excel2003/PC (running on XP) so
that I can go into the Immediate window and run the first line below,
and then if I question what the state of the screenupdating is
immediately afterward I've set it to False I get a result of True !!


Application.ScreenUpdating =False
?Application.ScreenUpdating
True


Any help greatly appreciated,
Regards
Jason.- Hide quoted text -


- Show quoted text -




 
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



All times are GMT +1. The time now is 05:09 PM.

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"