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

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.
 
S

Steve Yandl

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
 
D

Dave F.

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.
 
Top