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:
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,273
Members
448,559
Latest member
MrPJ_Harper

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top