Can I make a macro in excel for a date stamp


Posted by Jack Jackelini on August 05, 1999 11:28 AM

I have been trying to figure out how to make a macro in VB or Excel that will allow me to simply click on the macro execuite and the date will be entered. The time must me the current day that I'm logged on at. Right now I must manually enter the numbers into Excel under the date format, I want a simple button to make for fewer keystroked.

Hope someone out here can help!!

Thanks

Jack

Posted by Chris on August 10, 1999 12:03 PM

Sub asdf()
Range("A1").Value = Format(Now, "mm/dd/yy")
End Sub

Chris

Posted by Jack Jackelini on August 10, 1999 12:41 PM

How can I make this macro work for any cell reference


The macro only put the date information in cell A1 how can I adjust the macro to allow me to place the date stamp macro in any cell I am in.

Thanks for the HELP!!!!


I have been trying to figure out how to make a macro in VB or Excel that will allow me to simply click on the macro execuite and the date will be entered. The time must me the current day that I'm logged on at. Right now I must manually enter the numbers into Excel under the date format, I want a simple button to make for fewer keystroked.

Posted by Chris on August 10, 1999 1:26 PM

Re: How can I make this macro work for any cell reference

here you go:

Sub asdf()
ActiveCell.Value = Format(Now, "mm/dd/yy")
End Sub



Posted by Ivan Moala on August 12, 1999 3:33 AM

Re: How can I make this macro work for any cell reference

Or
for a user to select the cell try the following

Sub asdf()

Set myCell = Application.InputBox(prompt:="Select a cell", Type:=8)
myCell.Formula = Format(Now, "mm/dd/yy")
End Sub