View Single Post
  #3   Report Post  
JohnL
 
Posts: n/a
Default

Jason, I like your macro and succesfully "ran" it. How can I
adjust it to list the tabs which have charts? I tried to replace
"Worksheets" with "Charts" but ran into an error at ".Cells"

Sub PrintCHNames()
Dim ch As Chart
Dim i As Long

With ActiveWorkbook
.Charts(1).Select
Set ch = .Charts.Add
End With

With ch
For i = 2 To ActiveWorkbook.Charts.Count
.Cells(i, "A").Value = Charts(i).Name
Next i
.Cells(1, "A").Value = "Sheet " & "Names (excl. this one)"

[A:A].EntireColumn.AutoFit

..PrintOut Copies:=1, Collate:=True

End With
End Sub

Thanks in advance, Jason

"Jason Morin" wrote:

Try a macro like this:

Sub PrintWSNames()
Dim sh As Worksheet
Dim i As Long

With ActiveWorkbook
.Worksheets(1).Select
Set sh = .Worksheets.Add
End With

With sh
For i = 2 To ActiveWorkbook.Worksheets.Count
.Cells(i, "A").Value = Worksheets(i).Name
Next i
.Cells(1, "A").Value = "Sheet " & _
"Names (excl. this one)"

[A:A].EntireColumn.AutoFit

.PrintOut Copies:=1, Collate:=True
End With

End Sub

---
HTH
Jason
Atlanta, GA

-----Original Message-----
I can view a list of the worksheet tabs using the

properties command and
viewing the contents tab, however sometimes I need to

print a list of the tab
names. To do this I use the Print Screen. This is slow

and must be done
several times to include all the tab names. Is there a

way of printing this
list any faster?
.