LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default header formatting

Mike,

Try replacing "ActiveWorkbook.Name" with "&F" that may work...

HTH

"Mike" wrote:

I create a header in a work book using

With ActiveSheet.PageSetup
.RightHeader = "&B" & ActiveWorkbook.Name & "&B" & Chr(13) & "&A" &
Chr(13) & "&D" & Chr(13) & "Page &P of &N"
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
ActiveWindow.Zoom = 75
End With

This macro is in file xxx. When the user runs this macro and saves the file
to yyy.xls. I want the first line of the header to be yyy.xls. Currently if
the user runs the macro and saves the file to a different name. The header
is xxx.xls.

What am I missing?
Thanks for any help
Mike

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header formatting problem ts1 Excel Programming 2 October 28th 05 06:27 PM
Formatting separate lines of header ts1 Excel Programming 3 October 24th 05 03:35 AM
Formatting Date in Header & Footer Eliza Excel Discussion (Misc queries) 1 March 15th 05 09:17 PM
Formatting Codes for header and footer chambers777 Excel Programming 2 January 6th 04 11:50 PM
Formatting a header with VBA universal[_15_] Excel Programming 2 December 10th 03 02:07 PM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"