Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Window Resize
Ryan,
A simple record of a macro produced the following code: see if this helps... '''''''''''''''' Application.WindowState = xlNormal Application.Left = 155.5 Application.Top = 35.5 Application.Width = 700 Application.Height = 500 ''''''''''''''''''''''''''''''''''''''' -- steveb (Remove 'NOSPAM' from email address if replying direct) "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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Window Resize
Ryan,
Excel is funny this way. Either/Or. So I recorded (and modified) another macro and reduced one workbook and enlarged the second to fit the screen.... There are ways to have the code identify the windows with variables. '''''''''''''''' With Windows("Book1.xls") .Top = 1 .Left = 5 End With With Windows("Book1.xls") .Width = 691.5 .Height = 432 End With With Windows("Book2.xls") .Top = 100 .Left = 50 End With With Windows("Book2.xls") .Width = 200 .Height = 100 End With ''''''''''''''''''''''''''' -- steveb (Remove 'NOSPAM' from email address if replying direct) "Ryan" wrote in message ... Steve, The code that you gave me works almost perfectly. The one problem is that it resizes the original workbook too. I want it so that Excel stays maximized but the new workbook is smaller. I will play around with it some and see if I can figure it out, but if anyone knows how to fix this problem please post. Ryan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Window Resize
In place of "Application" use "ActiveWindow".
-- Jim Rech Excel MVP "Ryan" wrote in message ... | Steve, | | The code that you gave me works almost perfectly. The one problem is that it resizes the original workbook too. I want it so that Excel stays maximized but the new workbook is smaller. I will play around with it some and see if I can figure it out, but if anyone knows how to fix this problem please post. | | Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot Resize Workbook window | Excel Discussion (Misc queries) | |||
How to resize Data Form dialog window? | Excel Worksheet Functions | |||
Need to resize a worksheet window | Excel Discussion (Misc queries) | |||
Resize the workbook window is impossible | Excel Discussion (Misc queries) | |||
Window Resize | Excel Programming |