Zoom property error

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

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?
 
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).Select
ActiveWindow.Zoom=100
 
Back
Top