ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I add the current date/time to my code when I print it? (https://www.excelbanter.com/excel-programming/309800-can-i-add-current-date-time-my-code-when-i-print.html)

Dave F.[_3_]

Can I add the current date/time to my code when I print it?
 
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.



Steve Yandl[_3_]

Can I add the current date/time to my code when I print it?
 
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

"Dave F." wrote in message
...
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.





Dave F.[_3_]

Can I add the current date/time to my code when I print it?
 
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.


"Steve Yandl" wrote in message
...
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

"Dave F." wrote in message
...
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.








All times are GMT +1. The time now is 10:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com