View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default ??? application.screenupdating no longer works! Why???

There is a difference between running code in Debug from the VBE and running
normally whilst looking at Excel.
AFAIK, VBE can reset the ScreenUpdating to True whilst debugging, otherwise
you cannot see what happened.
Run the code normally and see the difference.
You would of course need some code that would actually be noticably
different with ScreenUpdating=True or False.

NickHK

"CraTaw" wrote in message
...
I followed your suggestion to set a watch for a change and ran the

following
code.

Sub test()
Application.ScreenUpdating = False
Range("a1") = "aaa:"
MsgBox (Application.ScreenUpdating)
Application.ScreenUpdating = True
End Sub

The results:
The messagebox said "False" as expected. The watch stopped at each
screenupdating call, to signal that a change had occurred; again as

expected.

However, something is badly messed up. I stepped through the test code to
see what I could find. After executing "Application.ScreenUpdating =

False",
I hovered my mouse over "Application.ScreenUpdating" and it said "True".

Very
strange!?! After it executed the next line [Range("a1") = "aaa:"], it
immediately updated the screen. Now that's bad!?!

So now I'm wondering what is going on. Any help will be appreciated.