Header format (and using VB for header content)

B

Brandon

I would like to have a year range in the header that looks
like 2002-2003 but am unable to do it. I am using the
following VB macro:

Sub Change_Format()
ActiveSheet.PageSetup.CenterHeader = Format(Now, "YYYY-
1,YYYY")
End Sub

But I cannot figure out how to have 1 taken from the year.
How can I accomplish this.

Also, is there a way to format the header of every sheet
of the book ('ActiveWorkbook' in place of 'ActiveSheet'
doesn't seem to work) without needing to select each sheet
and modifying the header?

I appreciate any help.

TIA,

-Brandon
 

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