Window sizing

C

Carl L Cooper

I have been using Excel on the Mac for 20 years, but there's something
elementary which I'm missing about window activity.

When I open most of my workbooks, Excel has memorized the last window size,
window position, degree of magnification, toolbars to be displayed, etc., so
that everything is just the way I want it.

On several workbooks, however, the "wrong" size window will appear. Or the
top of the sheet will be hidden beneath the standard toolbar. Or the
horizontal scroll bar at the bottom of the screen does not show. These
things are easily corrected by zooming or by creating a custom view and
clicking "Show." But surely there is a way to have Excel memorize the
features I want so that I don't have to tinker once the workbook is open.

Workspace files pose a particular problem in this regard.

Many thanks,

Carl
 
G

gls2815

Carl,

I'm far from proficient in VBA, but this might help. If you have this
VBA code in a module of any open workbook, every workbook opened
concurrently will be set to maximum size without any toolbar
sneak-unders:

Public Sub Workbook_Activate()
ActiveWindow.WindowState = xlMaximized
End Sub

The word "Public" before the sub procedure means this bit of code will
run every time you open another workbook, not just the one that
contains the code, but only as long as you have the workbook that
contains the code open. You can make it specific to just one workbook
by exchanging the word "Private" for Public in the code and placing it
directly in the ThisWorkbook object instead of a module, but that
depends if you just want it to affect that one sheet.

Also, I'm sure someone on here much smarter than me would be able to
explain how you can make the code a part of Excel's custom commands
that can be invoked with a key combination.

Hope this helps.

Gerard
 

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