Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Always Open at 100% Zoom.

Always Open at 100% Zoom

Written by Allen Wyatt (last updated May 23, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003


4

If you work with workbooks first worked on by your colleagues, you may be frustrated by the zoom factor applied to those workbooks by those others. For instance, if your colleague (Wanda) has a huge monitor, it wouldn't be uncommon for her to reduce the zoom factor on Excel to 75% or even 60%. The purpose, of course, is so she isn't overpowered by things that look very large at the full zoom factor.

The problem is that the zoom factor is saved with the workbook. Thus, when Wanda saves the workbook and hands it off to you, when you open it, the workbook is still displayed at whatever zoom factor Wanda last used. If you don't have the same size monitor as Wanda, then the workbook may be almost illegible on your system.

There are only two possible solutions to this problem. First, you can simply adjust the zoom factor once you open the workbook. There are a multitude of ways to do this, but the easiest involve the Zoom setting on the Formatting toolbar, or using the scroll wheel on your mouse. (On some systems you may need to hold down the Ctrl key in order for the scroll wheel to adjust the zoom factor.)

The second workaround is to create a macro that gets saved with the workbook. The macro can run every time the workbook is opened, and thereby set the zoom factor. (This macro should be added to the This Workbook code window in the VBA editor.)

Private Sub Workbook_Open()
    ActiveWindow.Zoom = 100
End Sub

The only problem with a macro such as this, of course, is that whenever Wanda (your colleague) opens the workbook on her system, the zoom factor is also set and she'll get just as frustrated with you as you were with her.

Perhaps a solution is to create a more involved macro—one that checks the current screen resolution and then sets the zoom factor accordingly. For instance, the following macro could be used to make the adjustments based on resolution:

Declare Function GetSystemMetrics32 Lib "user32" _
    Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long

Public Sub ScreenRes()
    Dim lResWidth As Long
    Dim lResHeight As Long
    Dim sRes As String

    lResWidth = GetSystemMetrics32(0)
    lResHeight = GetSystemMetrics32(1)
    sRes = lResWidth & "x" & lResHeight
    Select Case sRes
        Case Is = "800x600"
            ActiveWindow.Zoom = 75
        Case Is = "1024x768"
            ActiveWindow.Zoom = 125
        Case Else
            ActiveWindow.Zoom = 100
    End Select
End Sub

This routine checks the screen resolution and adjusts the window accordingly. Other resolutions and zooms may be added easily. To make the routine run automatically, just use a Workbook_Open event handler in the This Workbook code window to trigger the macro:

Private Sub Workbook_Open()
    ScreenRes
End Sub

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2668) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Always Open at 100% Zoom.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Deleting Index Entries

When you construct an index you need to insert all sorts of index fields throughout your document. If you want to later ...

Discover More

Editing Headers and Footers

Headers and footers are a nice final touch in a document. You can easily edit them by using the methods described in this ...

Discover More

Using Find and Replace to Change Text Case

Can you really use Find and Replace to change the case of text in your document? Not really, but that shouldn't stop you ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Stopping Help from Using Online Resources

The two newest versions of Excel rely upon the Internet to grab help information. If you don't want Excel to seek help ...

Discover More

Maintaining the Active Cell

Move from one worksheet to another, and Excel selects whatever cell was last used in the worksheet you are selecting. If ...

Discover More

Canceling a Menu

Want to cancel whatever menu command you started to use in Excel? The normal method is by pressing Esc, but this is not ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2024-08-19 08:00:47

Sara

This is a really useful bit of coding - thank you!

Is there a way to apply the first to the whole workbook?

Private Sub Workbook_Open()
ActiveWindow.Zoom = 100
End Sub

(I've tried ActiveWorkbook but that didn't work!)

Many thanks!


2022-12-10 01:52:47

c

The first solution work be perfect for my needs.

Private Sub Workbook_Open()
ActiveWindow.Zoom = 100
End Sub

However it won't work because when the macro runs the there is no active window yet. Once my macro runs through completely then the worksheet loads afterwards. How do I get a macro to run after the worksheet is loaded up?


2020-11-26 16:56:36

Mark

Hello Allen, thanks for the tip! This little snippet of code might just be what I need.

Question: I note that the two resolutions that you used in your code are both 4:3 aspect ratio which probably isn't all that common anymore. Having said that, there are probably a few monitors kicking around in that format. Is there a way to modify the code so that it will detect the resolution of 'whatever' monitor it is opened on and adjust accordingly? My workbook could possibly be used by anyone on the planet so I would like to prepare for any contingency.

I guess my only other choice would be to modify the code to include all possible resolutions(?).

Thanks again! Look forward to your reply.


2020-10-29 01:07:08

anna

what is the definition of 100% zoom?
thankyou...


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.