VBA – Zoom in and Out of Worksheets



ActiveWindow.Zoom

You can use VBA to change the Zoom of a worksheet. Here’s code to change the Zoom of the ActiveWindow to 50%:

Change Zoom on all Worksheets

You can also loop through all the worksheets in your workbook to set a standard Zoom. The following Macro will set the Zoom for all worksheets to 50%:

Zoom Zoom

And finally a magically growing worksheet. The following macro will loop through the Zooms for Sheet1, going from 10% to 200%, incrementing by 10%, pausing a second between changes, and then it will restore Sheet1 back to it’s original state.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about Easy VBA. A VBA add-in to quickly insert any of the sample code found on our site directly into the Visual Basic Editor, save your own frequently used code, and more!

alt text

Stop searching for VBA code online. Try the Code VBA Add-in…

Learn More!


<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues:

Leave A Comment