VBA – Zoom in and Out of Worksheets

Associated Files Download Links


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 AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text

Learn More!

<<Return to VBA Examples

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

You may also like some of this related content...

Worksheet_Change Event You may want to run a macro when a cell changes. A popular
This tutorial will discuss how to add / insert worksheets using VBA. Add Sheet This
Application.Sheets.Count - Count Worksheets If you ever need to count the number of sheets in
Macros applied to an entire workbook can be handy for extracting data from multiple sheets
The following macro loops through every sheet in a workbook and writes the tab name