View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] horkuang@horkuang.com is offline
external usenet poster
 
Posts: 8
Default moving between windows

Do you mean you have multiple workbooks open, each with multiple
worksheets ?
Or that you have multiple windows of the same workbook ?

If the former, you need to work with the WorkBooks collection. There
will be "WorkBooks.Count" workbooks open, indexed in the order they
were opened. Each will have "Workbook(i).Worksheets.Count" worksheets.

If the latter, then you need to work with the Windows collection.
Windows(1) is always the ActiveWindow. You can use Windows(i).Caption
to identify which you want.

NickHK

Hawkdriver wrote:
When I have multiple worksheets open, lets say (3) and they are arranged
horizontaly so you can see all 3, how does VB move between each worksheet and
how does it relate to the sheets position? If I cannot use a name or date to
differentiate between them what is their order? and does it matter if the
macro is local to one of the sheets or can it be in the "personal"sheet?