![]() |
Form Code Required
Hi
I run Excel 2K Does anyone have some VB code that forces a form to open to the maximum screen size available. Also, where would I put the code if it is available. Thanks |
Form Code Required
This doesn't force it to open to cover everything on the screen, but does
open it to cover the displayed spreadsheet: Private Sub UserForm_Initialize() Me.Width = ActiveWindow.Width Me.Height = ActiveWindow.Height End Sub The code goes into the form's Initialize event process. Here's a page that shows how to get the current screen resolution, and you could use it in conjunction with the above code to make the form cover the entire screen. http://www.bygsoftware.com/Excel/VBA/screen_size.htm "John Calder" wrote: Hi I run Excel 2K Does anyone have some VB code that forces a form to open to the maximum screen size available. Also, where would I put the code if it is available. Thanks |
Form Code Required
Thanks a lots !
"JLatham" wrote: This doesn't force it to open to cover everything on the screen, but does open it to cover the displayed spreadsheet: Private Sub UserForm_Initialize() Me.Width = ActiveWindow.Width Me.Height = ActiveWindow.Height End Sub The code goes into the form's Initialize event process. Here's a page that shows how to get the current screen resolution, and you could use it in conjunction with the above code to make the form cover the entire screen. http://www.bygsoftware.com/Excel/VBA/screen_size.htm "John Calder" wrote: Hi I run Excel 2K Does anyone have some VB code that forces a form to open to the maximum screen size available. Also, where would I put the code if it is available. Thanks |
Form Code Required
You're welcome. I tried mixing the 'get screen size' function in with it to
resize and it actually came out larger than my display, so if you go that route, it will take some tweaking to get right. "John Calder" wrote: Thanks a lots ! "JLatham" wrote: This doesn't force it to open to cover everything on the screen, but does open it to cover the displayed spreadsheet: Private Sub UserForm_Initialize() Me.Width = ActiveWindow.Width Me.Height = ActiveWindow.Height End Sub The code goes into the form's Initialize event process. Here's a page that shows how to get the current screen resolution, and you could use it in conjunction with the above code to make the form cover the entire screen. http://www.bygsoftware.com/Excel/VBA/screen_size.htm "John Calder" wrote: Hi I run Excel 2K Does anyone have some VB code that forces a form to open to the maximum screen size available. Also, where would I put the code if it is available. Thanks |
All times are GMT +1. The time now is 08:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com