![]() |
How Do I Autofit To Screen Size
I have a worksheet with buttons which have macro's assigned to it. Trouble is where I want to use this workbook all the monitors are different sizes. When I set it up on my screen (a large one) it does not all show on a small screen. If I set it up on a small screen I have to freeze the cells so that I can keep to show on a large screen. The reason I freeze the cells also is so that you cannot scroll up and down the page. Can anyone help as to how I can set the screens up so it covers the whole screen if set up on a large screen but used on a small one and if I can freeze the panes so I cant scroll them. Many Thanks -- tweacle |
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 |
How Do I Autofit To Screen Size
Ken Johnson Wrote: 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 Many Thanks -- tweacle |
How Do I Autofit To Screen Size
You're welcome Tweacle. Thanks for the feedback.
Ken Johnson |
All times are GMT +1. The time now is 06:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com