ScreenUpdating Problem

P

pjhageman

This code does not work unless I comment out the ScreenUpdating lines.
Can someone help correct this problem?
Thanks, Phil

Sub GoToStrategy1() 'Positions the first strategy on screen
Application.ScreenUpdating = False
Range("A1").Select
ActiveWindow.Zoom = True
ActiveWindow.Zoom = 62 'Sizes the window to 62%
Application.ScreenUpdating = True
End Sub
 
R

Rocky McKinley

It works fine on Excel 2002 & WinXP Pro, is there a "Change Event" firing
when selecting "A1" that calls other code that could be interfering? It's
just a hunch but you could try turning "off " and then "on" events while
running the code.

I don't think you need the "ActiveWindow.Zoom = True", this makes the zoom
400% which is unnecessary because it really ends up at 62% anyway.

Sub GoToStrategy1() 'Positions the first strategy on screen
Application.EnableEvents = False
Application.ScreenUpdating = False
Range("A1").Select
'ActiveWindow.Zoom = True
ActiveWindow.Zoom = 62 'Sizes the window to 62%
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top