Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to add the capability to the sub below of getting the name of
each worksheet within the open workbooks. I tried nesting a For Each wsNames(j) within the For Each wb in Application.Workbooks loop. I was not able to resolve the errors. Your suggestions are appreciated. Sub wbsOpen() ' Get the names of all open workbooks and store in an array Dim wbNames(), wsNames() As String Dim i, j As Integer, wb As Workbook, ws as Worksheet ReDim wbNames(1 To Workbooks.Count) i = 1 For Each wb In Application.Workbooks wbNames(i) = wb.FullName Debug.Print wbNames(i) i = i + 1 Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why I get gray area in sheet tab of page setup? can't resize area. | Excel Discussion (Misc queries) | |||
When I open Excel, workbooks open automatically. How can I stop t | Excel Discussion (Misc queries) | |||
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
comparing cells in different workbooks - open a certain sheet | Excel Programming |