How can I change the zoom size of all sheets, in a workbook?

Angelo Dundee

Board Regular
Joined
Nov 18, 2002
Messages
167
The following macro, each time it is executed reduces the zoom
size of all the sheets by 10%, to a minimum of 50% :-


Dim myZoom As Integer
myZoom = ActiveWindow.Zoom - 10
If myZoom >= 50 Then
ActiveWindow.Zoom = myZoom
Dim currentSheet As Worksheet
Set currentSheet = ActiveSheet
Dim mySheet As Worksheet
For Each mySheet In Worksheets
mySheet.Activate
ActiveWindow.Zoom = myZoom
Next mySheet

currentSheet.Activate
End If

The problem with this macro is that I don't want to have to
make a sheet active in order to reduce it. ( because they
momentarily appear on the screen )
Can I reduce a sheet without making it active, if so what
code would I use to replace some of the above ?

:oops:
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

MikeNewton

Board Regular
Joined
Nov 17, 2004
Messages
182
Select all sheets (using shift key) then select size

Or, if it must be by macro, turn screenupdating to false before procedure(and true after.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,433
Messages
5,572,080
Members
412,439
Latest member
BKPE
Top