J Ji Wenke Aug 14, 2003 #1 I want to record current time (Hour-Minutes-Second) in VBA.How to accomplish with VB code,use what system function call
I want to record current time (Hour-Minutes-Second) in VBA.How to accomplish with VB code,use what system function call
R Rocky McKinley Aug 14, 2003 #2 Hi Ji, Try this, Sub TimeStamper() Range("A1").Value = Now Range("A1").NumberFormat = "H:MM AM/PM" End Sub Regards, Rocky McKinley
Hi Ji, Try this, Sub TimeStamper() Range("A1").Value = Now Range("A1").NumberFormat = "H:MM AM/PM" End Sub Regards, Rocky McKinley
M Michael Bednarek Aug 14, 2003 #3 I want to record current time (Hour-Minutes-Second) in VBA.How to accomplish with VB code,use what system function call Click to expand... I probably misunderstand the question, but doesn't: Hour(Now) & "-" & Minute(Now) & "-" & Second(Now) work for you? (Nit pick: the above might give unexpected results when its execution straddles midnight.)
I want to record current time (Hour-Minutes-Second) in VBA.How to accomplish with VB code,use what system function call Click to expand... I probably misunderstand the question, but doesn't: Hour(Now) & "-" & Minute(Now) & "-" & Second(Now) work for you? (Nit pick: the above might give unexpected results when its execution straddles midnight.)
R Rocky McKinley Aug 14, 2003 #4 Hi Ji, Oops should have included ":SS" as below, Sub TimeStamper() Range("A1").Value = Now Range("A1").NumberFormat = "H:MM:SS AM/PM" End Sub Regards, Rocky McKinley
Hi Ji, Oops should have included ":SS" as below, Sub TimeStamper() Range("A1").Value = Now Range("A1").NumberFormat = "H:MM:SS AM/PM" End Sub Regards, Rocky McKinley