Sub asdf()
Range("A1").Value = Format(Now, "mm/dd/yy")
End Sub
Chris
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.
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
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