Print Worksheets

P

Paul Corrado

Pam,

Insert this code into a VBA project module.

Alt+F11 to access the VBA Editor, select the VBPProject for the workbook and
Insert|Module

Then go back to your worksheet and use Tools|Macros and select and run the
macro to create a list of the sheetnames in the active workbook. Then just
print the range.


Sub ListPageName()
Dim SheetName As String
Dim SheetCount As Integer
Dim i As Integer
SheetCount = ActiveWorkbook.Sheets.Count
For i = 1 To SheetCount
SheetName = ActiveWorkbook.Sheets(i).Name
ActiveCell.Offset(i - 1, 0).FormulaR1C1 = SheetName
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top