Thread: Screen Size
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Dave is offline
external usenet poster
 
Posts: 1,388
Default Screen Size

Hi,
Here is some code I use to ensure that at least Columns up to and including
Column P are always visible. It works by using the VisibleRange thingy to
manipulate the zoom %.
Change the two Columns.Count refs to suit your page.
Put this code into an event macro for the sheet you want it to work on.


ActiveWindow.Zoom = 100
A = 100
If Windows(1).VisibleRange.Columns.Count < 17 Then
Do Until Windows(1).VisibleRange.Columns.Count 16
ActiveWindow.Zoom = A
A = A - 1
Loop
End If

Hope this helps.