Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Uisng the Max and Index function to link to other workbooks | Excel Discussion (Misc queries) | |||
INDEX and workbooks | Excel Worksheet Functions | |||
suddenly my excel workbooks are "shared workbooks" | Excel Discussion (Misc queries) | |||
index & match with links for updating to other workbooks | Excel Worksheet Functions | |||
dynamic, double vlookup, match, index, dget?? different workbooks | Excel Worksheet Functions |