Changing the Zoom to open a document in 100%

J

Jo Ann Teresi

When I open a particular document on my computer it
automatically shows it at 100% Zoom. However, my boss has
a problem showing the document on his computer at less
than 100%. He would like to change it so that he does not
have to adjust it at 100% every time he opens the
document. Can you tell me how this could be done?
 
D

Dave Peterson

Do you really want the zoom changed to 100% or do you want it so that he can see
the same columns as you see?

If you want to set the zoom to 100%, you can do something like this in your
auto_open (or workbook_open) code:

Option Explicit
Sub auto_open()

Dim wks As Worksheet

For Each wks In ThisWorkbook.Worksheets
wks.Activate
ActiveWindow.Zoom = 100
Next wks

Application.Goto Worksheets("sheet1").Range("a1"), Scroll:=True

End Sub

If you wanted to make sure that columns A:L (say) are visible no matter what the
zoom factor is, you can do something like:

Option Explicit
Sub auto_open()

Dim wks As Worksheet

For Each wks In ThisWorkbook.Worksheets
Application.Goto wks.Range("a1:l1"), Scroll:=True
ActiveWindow.Zoom = True
wks.Range("A1").Select
Next wks

Application.Goto Worksheets("sheet1").Range("a1"), Scroll:=True

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top