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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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