Zoom

D

David

How can I reproduce the View|Zoom menu action using code?
I am using ActiveWindow.Zoom =

My problem is that this not zoom in to the cursor
position, as does the menu otpion.

David
 
M

Mike Fogleman

First, the Zoom function will zoom in on the selected cell, not the mouse
cursor.
You need to enter the Zoom value:

ActiveWindow.Zoom =200 (allowable range is 10-400)

If you are trying to find the active cell because it is somewhere off the
visible area, by using Zoom, then the Zoom value you enter must be different
from what the current value is.
The above code set it to 200 and the selected cell is no longer visible, to
find it again:

ActiveWindow.Zoom =199

If you just want to find the selected cell wherever it is, without zooming
in and out:

Selection.CurrentRegion.Select
 

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