Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


Date and time stamp

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
ddanmcgrew



Joined: 14 Nov 2008
Posts: 7
Location: Seattle

PostPosted: Tue Dec 02, 2008 5:00 pm    Post subject: Date and time stamp Reply with quote

I have written a macro for an engineering application.
I want it to Date and time stamp the output page so later runs can be
easily distinguished from previous runs of the macro.
The user puts data in on an input page, the macro creates a table, does calculations on the table then prints output to an output page.
After the user has run the macro he copys the input and output pages renaming them, saving them as proof of his input data and the results.

The function "Now" updates the date-time stamp every time the sheet is made active. I need a function that puts the date and time of the macro run that never changes. Question

Thanks for your help with "worksheetfunction"
Back to top
View user's profile Send private message
Kenneth Hobson
Gold Member
Gold Member


Joined: 25 Mar 2007
Posts: 21
Location: Tecumseh, OK

PostPosted: Fri Dec 05, 2008 10:01 am    Post subject: Reply with quote

[code]If IsEmpty(Sheet1.Range("A1")) then Sheet1.Range("A1").Value = Date[/code]
Back to top
View user's profile Send private message
ddanmcgrew



Joined: 14 Nov 2008
Posts: 7
Location: Seattle

PostPosted: Fri Dec 05, 2008 3:49 pm    Post subject: Reply with quote

Thanks
What I had figured out while waiting for a reply was if I put the Excell function "NOW" somewhere on the spreadsheet (Out of view)
Then I created a string variable Time, assigned the value that was in the cell with the "NOW" funtion and had it print that value on the output sheet.
Not as elegent but no formating needed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group