Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
For i = 1 To Workbooks("Book1").Sheets.Count
Range("A" & i) = Workbooks("Book1").Sheets(i).Name
Next i
Sub ListSheetsInOtherWorkbooks()
'puts other workbook/sheet names into the ActiveSheet!A1, starting in the first empty row.
Dim wb As Workbook, ws As Worksheet, lRow As Long
lRow = ActiveSheet.[A1].Rows.Count + 1
For Each wb In Workbooks
If ThisWorkbook.Name <> wb.Name Then
For Each ws In wb.Worksheets
ActiveSheet.Cells(lRow, "A").Value = wb.Name
ActiveSheet.Cells(lRow, "B").Value = ws.Name
lRow = lRow + 1
Next
End If
Next
End Sub
Sub ListSheetsInOtherWorkbooks()
'puts other workbook/sheet names into the ActiveSheet!A1, starting in the first empty row.
Dim wb As Workbook, ws As Worksheet, lRow As Long
lRow = ActiveSheet.[A1].Rows.Count + 1
For Each wb In Workbooks
If ThisWorkbook.Name <> wb.Name Then
For Each ws In wb.Worksheets
ActiveSheet.Cells(lRow, "A").Value = wb.Name
ActiveSheet.Cells(lRow, "B").Value = ws.Name
lRow = lRow + 1
Next
End If
Next
End Sub
function ListSheetsInOtherWorkbooks(sWB as String, i as integer) As String
ListSheetsInOtherWorkbooks = Workbooks(sWB).Worksheets(i)
End function
Function ListSheetsInOtherWorkbooks(sWB As String, i As Integer) As String
ListSheetsInOtherWorkbooks = Workbooks(sWB).Worksheets(i).Name
End Function