Zoom

  • Thread starter Thread starter David
  • Start date Start date
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
 
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
 
Back
Top