#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Zoom

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Zoom

Range("A1:M24").Select
ActiveWindow.Zoom = True

--
Regards,
Tom Ogilvy

"David" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Zoom

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

"David" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom Gary''s Student Excel Discussion (Misc queries) 3 October 14th 09 06:37 PM
Please help! Print Preview Zoom is Grayed Out...Doesn't zoom. PK Excel Discussion (Misc queries) 0 July 20th 09 03:33 PM
ZOOM alex Excel Worksheet Functions 2 February 22nd 08 07:05 PM
Can't Zoom LOUR Charts and Charting in Excel 0 April 19th 07 09:00 PM
set zoom david Excel Programming 0 July 29th 03 05:16 PM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"