Default Magnification in Excel?

P

Prometheus

Is there a way to set the default magnification when you OPEN documents in
Excel? I find frequently in Excel 2004 that when I open an XLS file from a
Windows user via email, the magnification is at something like 50% and the
window is ³squeezed² into the upper-left corner of the screen. Is this a
limitation of Excel for Windows, Mac, neither...?

TIA
 
J

JE McGimpsey

Prometheus said:
Is there a way to set the default magnification when you OPEN documents in
Excel? I find frequently in Excel 2004 that when I open an XLS file from a
Windows user via email, the magnification is at something like 50% and the
window is ³squeezed² into the upper-left corner of the screen. Is this a
limitation of Excel for Windows, Mac, neither...?

It's a byproduct of the Windows standard 96 dpi screen resolution. That
makes many WinXL users choose a smaller magnification as their standard
(tho' 50% is kind of small, most of my Win clients use 75%).

When viewed on a Mac, at 72 dpi, the image is smaller than on a Wintel
machine. This is the same problem one often sees with web site design
done on a Wintel machine.

I have, as part of my startup add-in, a class module that resizes every
workbook I open and sets the zoom to 100. It also resets the zoom every
time I change worksheets.

I put this in a new class window, named MyWindowClass, in my add-in:

Public WithEvents oApp As Application

Private Sub oApp_SheetActivate(ByVal Sh As Object)
ActiveWindow.Zoom = 100
End Sub

Private Sub oApp_WorkbookOpen(ByVal Wb As Excel.Workbook)
SetWindows Wb
End Sub

Private Sub Class_Initialize()
Set oApp = Application
End Sub

Public Sub SetWindows(ByVal wbBook As Excel.Workbook)
Dim wnWindow As Window
For Each wnWindow In wbBook.Windows
With wnWindow
.Top = 1
.Left = 1
.Height = Application.UsableHeight - 30
.Width = Application.UsableWidth - 200
.Zoom = 100
End With
Next wnWindow
End Sub

I then put this in the ThisWorkbook module:

Dim clsMyWindow As MyWindowClass

Private Sub Workbook_Open
Set clsMyWindow = New MyWindowClass
End Sub

A demo add-in is at

ftp://ftp.mcgimpsey.com/excel/zoom100.xla
 

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