View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Screen redrawing

I think I'd just pepper my code with:

Debug.print application.screenupdating & "--Step ###"

Then run the code and see where it changed from false to true.

Maybe you have code that calls other code that toggles the screenupdating
setting. Maybe you're using a function that turns it off (often rare and I
think mostly from the analysis toolpak???).

Depending on what you find, it may mean that you can only add screenupdating =
false as soon as you see it toggled on (especially if you don't control the
other code).

David wrote:

Hi,
I've seen and religiously use the oft suggested technique to stop screen
flicker/refresh with running macros:
application.screenupdating=false
your code
application.screenupdating=true

I have one workbook, however, that merely switching between workbooks will
cause this workbook to redraw its selected sheet 3 times! Very annoying.

Could it be that its Workbook_Activate routine adds custom menus? Other
workbooks don't act that way even when menus are added. I've even gone so
far as to include all three:
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual

No change.
Can anyone shed light on this phenomenon, or offer a solution?

--
David


--

Dave Peterson