Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Le Jurassien,
ActiveSheet isn't being changed, hence the same name. Try: .CenterHeader = ActiveWorkbook.Name & _ vbLf & ws.Name -- Earl Kiosterud www.smokeylake.com ----------------------------------------------------------------------- "Le Jurassien" wrote in message ... 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, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help (Uppercase multiple ranges?) | Excel Discussion (Misc queries) | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) | |||
Help, need to speed up this macro | Excel Discussion (Misc queries) | |||
Macro Help In Excel | Excel Discussion (Misc queries) | |||
MACRO FOR SETTING MARGINS WITHOUT OVERRIDING HEADER AND FOOTER | Excel Discussion (Misc queries) |