ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Window Resize (https://www.excelbanter.com/excel-programming/298206-re-window-resize.html)

Jim Rech

Window Resize
 
To "restore" a window you use code like this:

ActiveWindow.WindowState = xlNormal

To position it you use the window's Left, Top, Width and Height properties.

--
Jim Rech
Excel MVP
"Ryan" wrote in message
...
|I have a command button in a spreadsheet that opens up another spreadsheet.
I want to know how I can set it so that when the second spreadsheet opens, I
can set the size of the window it is in, or at least have it not maximized
or minimized.
|
| Ryan



Bob Phillips[_7_]

Window Resize
 
Simply add it after the code that opens the workbook.

--
HTH

-------

Bob Phillips
"Ryan" wrote in message
...
Jim,

Thank you for the quick response. I am still confused as to how I would

write this code. Would I write it for the command button that opens the
second workbook or somewhere else? (I want it for the command button).
Also, how do I set the window's left, top, width, and height properties
through code?

Thanks
Ryan





All times are GMT +1. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com