Sergey Ryabov
Sergey Ryabov

Reputation: 656

Change sheet's Zoom for inactive page

As you know you may change sheet's zoom with the following code:

ActiveWindow.Zoom = 75

Is there a way to change zoom of inactive sheet?

Thanks

Upvotes: 0

Views: 135

Answers (1)

Tom K.
Tom K.

Reputation: 1042

Not that beautiful, but it works.

Sub SetZoom()

mySheet = ActiveSheet.Name

'both Sheet IDs and names will work here
zoomIt = Application.InputBox("What's the zoom-in-sheet?")

'go to that sheet (where you want to zoom in)
Sheets(zoomIt).Select

'put in zoom factor (e.g. 300)
zoomFactor = Application.InputBox("How much is the fi-- er.. zoom?")

'boom! zoomed!
ActiveWindow.Zoom = zoomFactor

'select your old sheet
Sheets(mySheet).Select


End Sub

Sayonara.

Upvotes: 3

Related Questions