Can I add the current date/time to my code when I print it?

  • Thread starter Thread starter Dave F.
  • Start date Start date
D

Dave F.

Hi
Excel 2002

I would like to add the date as a comment when I print it.
Is this possible?

Is VBAProjects the way to go?
Unfortunately there aren't any examples in the help to get me going.

Any help would be appreciated.

Dave F.
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets(1).Cells(1, 1).Value = "Printed at " & Now()
End Sub

This would put a time statement in Cell A1 on the first sheet.

Steve
 
Sorry, I completely failed to explain my clearly.

I wish to put the date in the actual code listing as a comment.

Is this possible?

Sorry again for any confusion.

Dave F.
 

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

Back
Top