Hello,
I did a quick search but didn't really see anything so I apologize if this has already been asked.
I have an Excel Spreadsheet where when data is entered into Cell B2, the current date and time is auto-populated in Cell A2 and so on down the sheet for example.
I found this code that is letting me do this operation of having the date entered into Column A:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Handler
If Target.Column = 2 And Target.Value <> "" Then
Application.EnableEvents = False
Target.Offset(0, -1) = Format(Now(), "dd-mm-yyyy hh:mm:ss")
Application.EnableEvents = True
End If
Handler:
End Sub
I'm looking for assistance on making Column A to be locked so that the user can not manually enter a date, and the user can only start with Column B for entering data. Is there a way to make this happen?
Thank you in advance.
Bookmarks