Computing.Net > Forums > Office Software > Time Stamp at the end of a VBA Mac

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Time Stamp at the end of a VBA Mac

Reply to Message Icon

Name: brbehm
Date: May 5, 2005 at 11:33:02 Pacific
OS: xp
CPU/Ram: intel
Comment:

I need to put a time stamp in a excel workbook, i tried Select a cell and press CTRL+; then SPACE then CTRL+SHIFT+; which does give a timestamp, but when it is recorded into a macro, it records the date and time i recorded the macro and not when the macro ran.



Sponsored Link
Ads by Google

Response Number 1
Name: rhawk7938
Date: May 5, 2005 at 17:53:52 Pacific
Reply:

I solved the problem with VB code. It only puts the date in if the cell is empty. If it's not empty that means the original date is already there.

ThisDate = FormatDateTime(Date, 2)
currentdate = Range("B5")
If IsEmpty(currentdate) Then
Range("B5") = ThisDate

Hope this helps.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Time Stamp at the end of a VBA Mac

Word macro end of doc? www.computing.net/answers/office/word-macro-end-of-doc/1982.html

How to paste TARGET of a hyperlink? www.computing.net/answers/office/how-to-paste-target-of-a-hyperlink/7658.html

MS Outlook Express Time stamp Error www.computing.net/answers/office/ms-outlook-express-time-stamp-error/5828.html