Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Controlling xlTiled windows arrangement

I have a new machine using xl2007 on Windows 10.
I believe what I have observed also applies to xl2003 on Vista,
but have not tested it
I have windows with captions:
busroutes.xls;1, busroutes.xls;2
busroutesR.xls;1, busroutesR.xls;2

by default Windows.Arrange ArrangeStyle:=xlTiled arranges
busroutesR.xls;2 busroutes.xls;1
busroutesR.xls;1 busroutes.xls;2

i.e. the windows are arranged with corresponding windows in diagonally
opposite positions.
I want to have the following arrangement:
busroutes.xls;1 busroutes.xls;2
busroutesR.xls;1 busroutesR.xls;2

The following code seems to do what I want:
Windows.Arrange ArrangeStyle:=xlCascade
Windows("busroutesR.xls;2").Activate
Windows("busroutes.xls;2").Activate
Windows("busroutesR.xls;1").Activate
Windows("busroutes.xls;1").Activate
Windows.Arrange ArrangeStyle:=xlTiled

After running the code the following shows what is happening in the
cttl+G debug pane:
for each x in windows: debug.Print x.caption:next
busroutes.xls;1
busroutesR.xls;1
busroutes.xls;2
busroutesR.xls;2
PERSONAL.XLSB

I.e., xlTiled places windows in vertical order first.

I failed to find this subject with Google.
I hope my discovery is interesting.
I hope more information and/or a better method will be volunteered. ;)
--
Walter Briscoe
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
Controlling windows explorer with VB macro gauss1976 Excel Discussion (Misc queries) 0 July 27th 06 09:30 AM
Controlling the windows taskbar from VBA (API example) John Keith[_2_] Excel Programming 1 September 21st 05 07:44 PM
Controlling Print Defaults - Printing From Windows Explorer Kim Excel Discussion (Misc queries) 2 June 2nd 05 09:56 PM
Controlling the windows taskbar from VBA? John Keith[_2_] Excel Programming 0 April 9th 05 04:57 PM
How to change windows.arrange from xlTiled to xlHorizontal and back in one procedure Zdenek Moravec Excel Programming 2 December 2nd 04 01:52 PM


All times are GMT +1. The time now is 10:07 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"