View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson
 
Posts: n/a
Default How Do I Autofit To Screen Size

Hi tweakle,
Say you want the workbook to open so that the rightmost visible column
is column V because the rightmost button is in line with column V, then
the following code placed in the ThisWorkbook code module will achieve
that, and all of your buttons will be visible.
Change the Range address to suit your needs.

Private Sub Workbook_Open()
Range("A1:V1").Select
ActiveWindow.Zoom = True
Range("A1").Select
End Sub


1.Copy the above code
2.Right Click any worksheet tab then select "View code" from the
contextual popup menu.
3.If the Project Explorer is not visible the go ViewProject Explorer.
4.Look for the ThisWorkbook icon then double click to open up its code
module.
5.Paste the code.
6. Return to Excel worksheet by pressing Alt + F11 or going FileClose
and Return to Microsoft Excel.
7. Close your workbook and reopen to check the effect of the code.

Ken Johnson