Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Arrange Icons of Minimized Excel Windows
When I open one workbook in Microsoft Excel 2003 SP 2, the macro code in the
spreadsheet includes a reference to a second workbook which opens the second workbook. When the second workbook loads, it minimizes itself. Then, I click a button in a worksheet of the first workbook to load a third workbook, which minimizes itself. However, the icons for the third workbook disappears behind that for the second workbook. I can remedy this situation if I right-click on one of the minimized workbooks and choose Arrange Icons from the context-sensitive menu that pops up. I would like to put a command into my program to arrange the icons immediately after the third workbook loads and minimizes itself. I see the Windows.Arrange method, but it applies to the open windows, not to the icons. My search of Help shows me many ways to arrange the icons on my Windows desktop, but not within Excel. What do I need to do? Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Arrange Icons of Minimized Excel Windows
You can't arrange windows that are minimized, using "Windows.Arrange". If
you want easy access to all the WBs, check the OptionsShown In Taskbar, then the Window State of a window does not matter. Or do not minimize the window, set .WindowState = xlNormal instead, then you can arrange them. NickHK "Johnny Naperville" ... When I open one workbook in Microsoft Excel 2003 SP 2, the macro code in the spreadsheet includes a reference to a second workbook which opens the second workbook. When the second workbook loads, it minimizes itself. Then, I click a button in a worksheet of the first workbook to load a third workbook, which minimizes itself. However, the icons for the third workbook disappears behind that for the second workbook. I can remedy this situation if I right-click on one of the minimized workbooks and choose Arrange Icons from the context-sensitive menu that pops up. I would like to put a command into my program to arrange the icons immediately after the third workbook loads and minimizes itself. I see the Windows.Arrange method, but it applies to the open windows, not to the icons. My search of Help shows me many ways to arrange the icons on my Windows desktop, but not within Excel. What do I need to do? Thank you. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Arrange Icons of Minimized Excel Windows
Show in Taskbar is selected in Tools | Options | View.
I would just like to know how to do programmatically what I can do manually, if possible. Thank you. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Arrange Icons of Minimized Excel Windows
Johnny,
Record a macro whilst you make that change. NickHK "Johnny Naperville" ... Show in Taskbar is selected in Tools | Options | View. I would just like to know how to do programmatically what I can do manually, if possible. Thank you. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Arrange Icons of Minimized Excel Windows
An excellent suggestion! I found that you can arrange the icons given some
caveats. 'Line 1: Open a workbook Workbooks.Open Filename:="C:\Work\MyWorkbook.xls" 'Line 2: Minimize it wb.Windows(1).WindowState = xlMinimized 'Line 3: Activate a window that I know is already open and minimized Windows("CommonCode.xls").Activate 'Line 4: Arrange the icons Windows.Arrange ArrangeStyle:=5 'Line 5: Put the focus on an open window Windows("AnotherWorkbook.xls").Activate The code on Line 4 will compile regardless. However, execution will halt with a run-time error unless the focus is on a minimized window. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Arrange Icons of Minimized Excel Windows
Johnny,
I can't check that at the moment, but it is normally a good idea to check the .WindowState before you try to change a window's property Recording a macro of any action you wish to perform (but are unsure the syntax) is always a good starting point. NickHK "Johnny Naperville" ... An excellent suggestion! I found that you can arrange the icons given some caveats. 'Line 1: Open a workbook Workbooks.Open Filename:="C:\Work\MyWorkbook.xls" 'Line 2: Minimize it wb.Windows(1).WindowState = xlMinimized 'Line 3: Activate a window that I know is already open and minimized Windows("CommonCode.xls").Activate 'Line 4: Arrange the icons Windows.Arrange ArrangeStyle:=5 'Line 5: Put the focus on an open window Windows("AnotherWorkbook.xls").Activate The code on Line 4 will compile regardless. However, execution will halt with a run-time error unless the focus is on a minimized window. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 File Icons in Windows XP | Excel Discussion (Misc queries) | |||
Grouped Sheets - Windows Arrange | Excel Discussion (Misc queries) | |||
Opens bhind other windows or minimized | Excel Discussion (Misc queries) | |||
Arrange Windows | Excel Discussion (Misc queries) | |||
arrange windows vertically - 2 selected sheets | Excel Programming |