Format Header Date

G

Guest

I have a monthly spreadsheet in which I have to change the date in the header
each month. I want to do this automatically so I use the &[Date] feature but
it gives me a format like: 11-11-07.

I would like it to show November 2007.

How can I do this?

Thanks.............TomCat
 
G

Guest

Put the following macro in the workbook code area:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date, "mmmm yyyy")
End Sub
 
G

Guest

Worked great.........thanks!

Gary''s Student said:
Put the following macro in the workbook code area:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date, "mmmm yyyy")
End Sub

--
Gary''s Student - gsnu200755


TomCat said:
I have a monthly spreadsheet in which I have to change the date in the header
each month. I want to do this automatically so I use the &[Date] feature but
it gives me a format like: 11-11-07.

I would like it to show November 2007.

How can I do this?

Thanks.............TomCat
 
G

Guest

One little Problem. I need the header to read Pending and Processing -
November 2007. When I use the macro, it only reads November 2007.

Gary''s Student said:
Put the following macro in the workbook code area:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date, "mmmm yyyy")
End Sub

--
Gary''s Student - gsnu200755


TomCat said:
I have a monthly spreadsheet in which I have to change the date in the header
each month. I want to do this automatically so I use the &[Date] feature but
it gives me a format like: 11-11-07.

I would like it to show November 2007.

How can I do this?

Thanks.............TomCat
 
B

Bob Phillips

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = "Pending and Processing - " &
Format(Date, "mmmm yyyy")
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

TomCat said:
One little Problem. I need the header to read Pending and Processing -
November 2007. When I use the macro, it only reads November 2007.

Gary''s Student said:
Put the following macro in the workbook code area:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date, "mmmm yyyy")
End Sub

--
Gary''s Student - gsnu200755


TomCat said:
I have a monthly spreadsheet in which I have to change the date in the
header
each month. I want to do this automatically so I use the &[Date]
feature but
it gives me a format like: 11-11-07.

I would like it to show November 2007.

How can I do this?

Thanks.............TomCat
 

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

Similar Threads

Format of Header Date 2
Cell Format - Date 2
Date Menace 2
Calculating interest due on late loan payments 1
COUNT BETWEEN A SPECIFIC DATE RANGE 4
formatting dates 12
Format Date in Header 2
Date Entry Problem 4

Top