Date in header

J

Jan

Using Excel 97. I created a macro (s) to change the header depending on
which dept will receive the report. I don't know VBA. In the header dialog
box, I selected the date icon to insert the date. When I look at the macro
via the VBA editor it shows as &D. On the report it will print the date as
5/11/2006. I would like it to print the date as May 11, 2006. How can I
change the following code to format the date as preferred. I have only
listed a few lines of the code.

With ActiveSheet.PageSetup
.LeftHeader = "&""Cushing Book/Bold,Bold""&T"
.CenterHeader = _
"&""Cushing Book/Bold,Bold""&12Perpetual Art Department Project List
for &D"

Also, if the date is inserted in the header via running a macro, I assume
that the date will not change unless the macro is executed again....correct?

TIA
Jan
 
A

Ardus Petus

.CenterHeader = _
"&""Cushing Book/Bold,Bold""&12Perpetual Art Department Project List
for " & _
Format(Date,"mmm d, yyyy")

HTH
 

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