Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Revised Date in Excel

Status
Not open for further replies.

jmnekrkt

Programmer
Feb 21, 2002
47
US
I need to show the original creation date as well as the revised date in the header of my spreadsheet. Is there a way to do this in the header? In VBA?

Thank you,
JmNeKrKt
 
Nope!

Format a repeating row fpr printing, and put your dates there.

:) Skip,
metzgsk@voughtaircraft.com
 
I'm not sure about formulas to get the creation and modified dates into your worksheet, but I bet they're out there somewhere.

If you had the dates in a cell in your worksheet, you could use the following code to reference the cell in the header or footer:

ActiveSheet.PageSetup.Leftheader = Range("A1").value

Put that code in the workbook's BeforePrint event so that it runs each time you print.

If you go to Microsoft's help website, the article ID about Referencing Cells in Headers and Footers is Q273028.
 
The following is adapted from the help files and gives a list of the available file properties. By the nature of it, it writes to cells in a sheet.

On Error Resume Next
Err.Clear

rw = 1
Worksheets(1).Activate
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
Cells(rw, 2).Value = p.Value
rw = rw + 1
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top