auto.pilot
Well-known Member
- Joined
- Sep 27, 2007
- Messages
- 734
- Office Version
- 365
- Platform
- Windows
I would have sheet names in column A, ignoring the active sheet. How can I do this?
Code:
Sub GetSheetNames()
Dim ws As Worksheet, nextrow As Long
For Each ws In ThisWorkbook.Worksheets
nextrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row + 1
ActiveSheet.Range("A" & nextrow) = ws.Name
Next ws
End Sub