Macro for Custom Header
Hello,
How do I manage to get the macro that I have to display each worksheet name
within the workbook accordingly. Anytime I run the macro in question, the
workbook name displays correctly on each worksheet but the worsheet name does
not match. In fact, it assigns all worksheets the same name (i.e. sheet 1).
Please Help!
Public Sub DoFullPath()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
With ws.PageSetup
.CenterHeader = ActiveWorkbook.Name & _
vbLf & ActiveSheet.Name
End With
Next ws
End Sub
Thanks,
|