Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Zoom problem

In the below code, I get a Run-time error:'1004', "Unable
to set the Zoom property of the window class." The intent
here is to insure the window is sized to 54% when
the "Metrics" worksheet is selected by the macro. What do
I need to do to fix this?

Sub GoToMetric1()
'GoToMetricA1 Macro
Sheets("Metrics").Select
ActiveWindow.Zoom = 54
Range("A1").Select
ActiveSheet.ChartObjects("Chart 13").Activate
With ActiveChart.Parent
.Height = 550
.Width = 650
.Top = 10
.Left = 125
End With
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Zoom problem

Is the code in a sheet module. If so, try moving it to a general module and
call it from your sheetmodule.

--
Regards,
Tom Ogilvy

"Phil" wrote in message
...
In the below code, I get a Run-time error:'1004', "Unable
to set the Zoom property of the window class." The intent
here is to insure the window is sized to 54% when
the "Metrics" worksheet is selected by the macro. What do
I need to do to fix this?

Sub GoToMetric1()
'GoToMetricA1 Macro
Sheets("Metrics").Select
ActiveWindow.Zoom = 54
Range("A1").Select
ActiveSheet.ChartObjects("Chart 13").Activate
With ActiveChart.Parent
.Height = 550
.Width = 650
.Top = 10
.Left = 125
End With
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Zoom problem

Thanks, Tom
-----Original Message-----
Is the code in a sheet module. If so, try moving it to a

general module and
call it from your sheetmodule.

--
Regards,
Tom Ogilvy

"Phil" wrote in

message
...
In the below code, I get a Run-time

error:'1004', "Unable
to set the Zoom property of the window class." The

intent
here is to insure the window is sized to 54% when
the "Metrics" worksheet is selected by the macro. What

do
I need to do to fix this?

Sub GoToMetric1()
'GoToMetricA1 Macro
Sheets("Metrics").Select
ActiveWindow.Zoom = 54
Range("A1").Select
ActiveSheet.ChartObjects("Chart 13").Activate
With ActiveChart.Parent
.Height = 550
.Width = 650
.Top = 10
.Left = 125
End With
End Sub



.

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
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
Excel Zoom Problem VFortin Excel Discussion (Misc queries) 2 September 5th 07 08:17 PM
Problem when getting the printing zoom ration in Excel Stephen[_4_] Excel Programming 0 September 25th 03 03:41 AM
set zoom david Excel Programming 0 July 29th 03 05:16 PM


All times are GMT +1. The time now is 03:04 AM.

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"