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

Using Last-page Headers and Footers

Headers and footers add a nice touch to your documents, particularly if they are printed. You may want Word to use a ...

Discover More

Disabled Macros

Do your macros seem to be disabled on your new machine? It could be because of the security settings in Excel. Here's ...

Discover More

Returning Item Codes Instead of Item Names

The data validation capabilities of Excel are really handy when you want to limit what is put into a cell. However, you ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Setting Your Default Directory

You may want to have all your Excel workbooks stored in a specific location on your system. Here's how to set the default ...

Discover More

Getting Context-Sensitive Help

Need help on a particular topic, dialog box, or command? You can use Excel's powerful help system to get just the ...

Discover More

Finding the Number of Significant Digits

When looking at a number, you may wonder how many significant digits it contains. The answer is not always an easy one, ...

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 two more than 7?

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.