I have a basic spreadsheet that has elementary vb code in it. The spreadsheet acts as a todo list and when I put an "x" in colum 4, I get timestamp, date, and username in columns 5, 6, 7. The code is listed below and it has worked forever in MS excel 2000 and 2003. Now, I updated to Excel 2007, saved the file as an xlsm and it doesn't work when I have the file password to open set. When there is no password to open on the file, it works fine. I want to be able to lock the file to open and still have the vb code work. Any ideas?? I can email the small xlsm file to anyone that can potentially help me figure this out. Thanks.
- Private Sub Worksheet_Change(ByVal Target As Range)
-
If Target.Column <> 4 Then Exit Sub
-
Target.Offset(0, 1).Value = Format(Time, "h:mms")
-
Target.Offset(0, 2).Value = Format(Date, "m/d/yyyy")
-
Target.Offset(0, 3).Value = Application.UserName
-
End Sub