ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Zoom property error (https://www.excelbanter.com/excel-programming/279864-zoom-property-error.html)

luis

Zoom property error
 
I have a workbook with a chart and i have some VBA code to
format the chart, etc., but there is an instruction that
gives a Run Time error.
The instruction is "ActiveWindow.Zoom=100".

The error is:

Run-Time Error '1004'
"Unable to set the zoom property of the windo2 class."

Can someone help me solving this problem?

steve

Zoom property error
 
Luis,

If the chart is selected you will get the error.

First select a cell and than run the zoom

Range("A1").Select
ActiveWindow.Zoom=100

or use this to select the cell under the chart

Range(ActiveChart.Parent.TopLeftCell.Address).Sele ct
ActiveWindow.Zoom=100

--
sb
"Luis" wrote in message
...
I have a workbook with a chart and i have some VBA code to
format the chart, etc., but there is an instruction that
gives a Run Time error.
The instruction is "ActiveWindow.Zoom=100".

The error is:

Run-Time Error '1004'
"Unable to set the zoom property of the windo2 class."

Can someone help me solving this problem?





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com