panikos
asked on
Making a spreadsheet fit on the screen
I have a spreadsheet that needs to be looked at by lots of people on different PCs. Each PC will have its own settings and therefore whenever they receive the excel spreadsheet I send thm it doesn't appear nicely on the screen. Often all they need to do is change the zoom setting to view normally.
Is there some way that I can force my workbook to autofit on the user's screen regardless of their resolution.
I seem to remember something about xlstartup and autofit to screen functions in VBA but not sure how to use them.
Please help
Is there some way that I can force my workbook to autofit on the user's screen regardless of their resolution.
I seem to remember something about xlstartup and autofit to screen functions in VBA but not sure how to use them.
Please help
Here's a line of code I use in one of my spreadsheets. It's a spreadsheet a done some time ago, and I have to say I've no idea why I divide by 750, but it seems to work anyway!!!
ActiveWindow.Zoom = (ActiveWindow.UsableWidth / 750) * 100
ActiveWindow.Zoom = (ActiveWindow.UsableWidth / 750) * 100
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This may sound like a stupid question but please bear with me...
How can I make sure that the code above will execute when my users open the workbook? Will this be done automatically? I am using the code from smozgur
How can I make sure that the code above will execute when my users open the workbook? Will this be done automatically? I am using the code from smozgur
>Code goes into Thisworkbook module's Workbook_Open event sub.
YEs, it will be done automaticially. Because;
Workbook_Open event sub is the one which is executed automaticially when the user opens the workbook.
Suat
YEs, it will be done automaticially. Because;
Workbook_Open event sub is the one which is executed automaticially when the user opens the workbook.
Suat
A thought would be to try...
Sub Fill_Screen()
ActiveWindow.Zoom = True
End Sub
...called from (or the code embedded in) an Auto_Open() macro.
Regards,
Justin