Setting the magnification to a range of cell's

C

ceemo

I have a work book that is used by many users who have different
resolutions on their PCs's. Is there anyway i can get the workbook to
adjust itself on open so that a certain range of cells set by me fill
the workbook.
 
D

Dave Peterson

You can maximize the application window.
You can maximize the worksheet window.
and you can set the zoom percentage to show what you have selected.
(all in code)

Option Explicit
Sub auto_open()
Application.WindowState = xlMaximized
ActiveWindow.WindowState = xlMaximized
Application.Goto Worksheets("sheet2").Range("a1:x1"), scroll:=True
ActiveWindow.Zoom = True
End Sub
 
C

ceemo

Is there any way to get the magnification to auto adjust and keep to th
size of the window even if it is changed. Those allowing me t
deactivate the scroll bars. Obviouslythis will mean that if the windo
is mae to small there is a chance that the user will not be able t
read the worksheet
 
D

Dave Peterson

Are you asking if there is a way to not let the user change the zoom?

I don't think that there is 100% effective way. You could disable the zoom icon
on the toolbar and the View|Zoom option. But users could reset the toolbar or
even just run a macro (like you did).

But you could change the zoom level back to whatever you want each time the user
changes a selection.

I wouldn't do this, though.

There are lots of people who have vision problems. Why make their life more
miserable. And for those who don't have vision problems, why disable a feature
that might be useful to them?
 
Top