Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 File Icons in Windows XP Stown Excel Discussion (Misc queries) 1 March 17th 09 07:51 PM
Grouped Sheets - Windows Arrange JMay Excel Discussion (Misc queries) 8 November 15th 06 12:53 AM
Opens bhind other windows or minimized Jmmac04 Excel Discussion (Misc queries) 0 April 17th 06 05:34 PM
Arrange Windows Bean123r Excel Discussion (Misc queries) 0 January 24th 06 09:35 PM
arrange windows vertically - 2 selected sheets al007 Excel Programming 2 January 4th 06 02:47 AM


All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"