Text and Date in a macro
Posted by Rich Blessington on February 16, 2001 5:05 PM
I have to "sign" about 40 timesheets each week. I wrote a macro that goes to cell x60, unprotects the worksheet, enters my initials and the the date stamp (ctrl + ;) then reprotects and saves the sheet. The macro records the date stamp as the date the macro was written and never updates it after that. If I use the TODAY() command, the date updates everytime the spreadsheet is opened. Is there a way to put my initials and the date stamo in a macro so that it enters the current date everytime I use the acro but doesn't update each time the spreadhseet is opened? All of the info has to go in one cell.
Here's the macro I tried:
Timesheet Macro
' Macro recorded 02/16/2001 by Richard Blessington
'
' Keyboard Shortcut: Ctrl+b
'
Application.Goto Reference:="R60C24"
ActiveSheet.Unprotect
ActiveCell.FormulaR1C1 = "rb 02/16/2001"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWorkbook.Save
End Sub