VBA – Zoom – Fit Selection

Associated Files Download Links


Fit Selection

In a Worksheet you can use View->Zoom->Fit Selection to automatically adjust the Zoom to fit a selected Range.

You can “Fit Selection” in VBA by selecting the Range and setting Zoom equal to True.

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...

ActiveWindow.Zoom You can use VBA to change the Zoom of a worksheet. Here's code to
Page Break Preview Mode To place Sheet1 in Page Break Preview View from code: Sheet1.Activate
As cool as it looks watching your VBA macro manipulate the screen, you can help
Display Fullscreen You can launch Excel to display fullscreen using VBA by using this line
Hide Excel There may occasionally arise a need to hide all of excel, a good
Advertisements
Automate Excel
Left Menu Icon