Frank Freese
asked on
Print out sheets names
Folks,
I would like to print out my worksheets names from a workbook.
.
I would like to print out my worksheets names from a workbook.
.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks again
You are appreciated
You are appreciated
Maybe try:
Sub ListNames()
Dim w As Worksheet
Set w = Worksheets.Add
w.Name = "ListOfSheets"
For x = 1 To Worksheets.Count
w.Cells(x, 1) = Sheets(x).Name
Next
End Sub
You're welcome.
I found a small bug in our code. Change this
to this. Otherwise the "Formula" cell (A2) gets blanked out when the workbook opens.
Private Sub Workbook_Open()
Dim intIndex As Integer
With Worksheets("Menu")
For intIndex = 1 To LAST_MENU_ROW
Cells(intIndex, 1).Value = ""
Next
End With
ActiveWindow.ScrollRow = 10
End Sub
to this. Otherwise the "Formula" cell (A2) gets blanked out when the workbook opens.
Private Sub Workbook_Open()
Dim intIndex As Integer
With Worksheets("Menu")
For intIndex = 10 To .UsedRange.Rows.Count
.Cells(intIndex, 1).Value = ""
Next
End With
ActiveWindow.ScrollRow = 10
End Sub
ASKER
Thanks
What do you mean by print out? You mean actually printing it when printing the document to a printer? Or do you mean by creating a list of it?