Kevin's Office Tricks
Pages
Home
Word Tips
Excel Tips
Quick Tips
Tuesday, November 8, 2016
Listing Tab names in Excel
To list tabs in an Excel spread sheet use VBA
Sub ListSheetNames()
Dim R As Range
Dim WS As Worksheet
Set R = ActiveCell
For Each WS In ThisWorkbook.Worksheets
R.Value = WS.Name
Set R = R(2, 1)
Next WS
End Sub
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)