Workbooks Resolution

  • Thread starter Thread starter Ed Davis
  • Start date Start date
E

Ed Davis

Is there a way in a macro or function to have a workbook adjust to a new
resolution?
When I send a workbook to another PC some of the sheets are off the page.
 
Hi,

Excel can not detect the resolution of the monitor but you can write VBA
code that would call a Window's DLL. John Walkenback has something on this
in his Power Programming books, and you could check his web site.
 
Maybe you could use something like:

Option Explicit
Sub Auto_Open()
'maximize the Excel window
Application.WindowState = xlMaximized

'maximize the activewindow within Excel
ActiveWindow.WindowState = xlMaximized

'make columns A:Z visible
ActiveSheet.Range("a1:z1").Select
ActiveWindow.Zoom = True

'select a cell to make it look pretty
ActiveSheet.Range("A1").Select

End Sub

I used to make the column to the right of the last visible column very skinny.
Then I'd show that, too. It seemed to make things behave a bit nicer.
 
Back
Top