Although the profile information indicates I am using Excel 2011 for MAC, that is what I use at home. I am using Excel 2010 at work and that is where I am having problems. I created a macro to enter a timestamp in a cell in the h:mm:ss format. I also created shortcut key CNTRL+t
Here is the macro
Sub timestamp()
Let ActiveCell.Value = Time
Let ActiveCell.NumberFormat = "h:mm:ss"
End Sub
The macro works just fine until I protect the sheet. Then I get an error message when I run the macro.
Run-time error '1004':
Unable to set the NumberFormat property of the Range class.
Please help me debug this error.
Thanks!
Bookmarks