Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Workbooks Index (Excel 97)

Greetings,

Would like to be able to use "Index" for workbook collection but does not
appear to be able to do so.

'i.e. index works fine for sheet collections as in following
MsgBox ActiveWorkbook.ActiveSheet.Index

'but fails at workbook level.
MsgBox ActiveWorkbook.Index

Any help would be appreciated.

Thanks,

Dave



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Workbooks Index (Excel 97)

Hi Dave:

Apparently workbooks do not expose the Index property.

Regards,

Vasant.

"David Copp" wrote in message
. ca...
Greetings,

Would like to be able to use "Index" for workbook collection but does not
appear to be able to do so.

'i.e. index works fine for sheet collections as in following
MsgBox ActiveWorkbook.ActiveSheet.Index

'but fails at workbook level.
MsgBox ActiveWorkbook.Index

Any help would be appreciated.

Thanks,

Dave





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Workbooks Index (Excel 97)

? thisworkbook.Windows(1).Index
2

or
ActiveWorkbook.windows(1).Index

Ran this
Sub CheckIndex()
For Each wkbk In Workbooks
Idex = wkbk.Windows(1).Index
i = 0
For Each wkbk1 In Workbooks
i = i + 1
If wkbk1.Name = wkbk.Name Then
idex1 = i
Exit For
End If
Next

Debug.Print Idex, idex1, _
Workbooks(Idex).Name, Workbooks(idex1).Name
Next

End Sub

and it clearly showed me there is no correlation between the Index of the
workbook collection and the index of the Windows collection, but you may be
able to meet your need by using the windows collection.

? activewindow.Index, activewindow.Parent.Name
1 check_proc.xls

Of course the activewindow is always going to be index 1. The parent of a
window is a workbook object.

--
Regards,
Tom Ogilvy



David Copp wrote in message
. ca...
Greetings,

Would like to be able to use "Index" for workbook collection but does not
appear to be able to do so.

'i.e. index works fine for sheet collections as in following
MsgBox ActiveWorkbook.ActiveSheet.Index

'but fails at workbook level.
MsgBox ActiveWorkbook.Index

Any help would be appreciated.

Thanks,

Dave





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
Uisng the Max and Index function to link to other workbooks Marilyn Excel Discussion (Misc queries) 1 October 6th 09 06:56 PM
INDEX and workbooks Ginger Excel Worksheet Functions 5 September 9th 05 09:49 AM
suddenly my excel workbooks are "shared workbooks" Maggie's mom Excel Discussion (Misc queries) 1 August 28th 05 09:20 PM
index & match with links for updating to other workbooks wrpalmer Excel Worksheet Functions 3 July 20th 05 03:18 PM
dynamic, double vlookup, match, index, dget?? different workbooks Leslie Excel Worksheet Functions 11 June 27th 05 09:45 PM


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