Try this combination of worksheet-event process handling codes. The
_Change() event processor will lock the cells, one by one from A1 to E3000 as
they are used, while the _SelectionChange() event deals with forcing the
focus to the next empty cell in that sequence.
Choose the worksheet, right-click the sheet's name tab and choose [View
Code] and then copy and paste all the code below into the code module and
edit it to set things like the password as needed.
Private Sub Worksheet_Change(ByVal target As Range)
'this depends on the Worksheet_SelectionChange() event
'handler to force the focus to the next cell that
'should have an entry placed into it, working
'through columns A:E, rows 1:3000 in sequence
'
'start by selecting all cells on the worksheet and
'using Format --> Cells --> [Protection] to 'Unlock'
'all cells so that entries can be made in them
'The cells will be locked, one at a time as
'entries are made into them
'
Const sheetPassword = "myPassword" ' change as required
If target.Column > 5 Or _
target.Row > 3000 Or _
IsEmpty(target) Then
Exit Sub
End If
Me.Unprotect Password:=sheetPassword
target.Locked = True
Me.Protect Password:=sheetPassword
End Sub
Private Sub Worksheet_SelectionChange(ByVal target As Range)
Dim protectedRange As Range
Dim anyCell As Range
If target.Column > 5 Or _
target.Row > 3000 Then
'not in A:E, or below row 3000
'ignore
Exit Sub
End If
Set protectedRange = Me.Range("A1:E3000")
For Each anyCell In protectedRange
If IsEmpty(anyCell) Then
If anyCell.Address = target.Address Then
Exit For
Else
Application.Goto anyCell
'to force scroll to the cell
'use this instead
'Application.Goto anyCell, True
Exit For
End If
End If
Next
Set protectedRange = Nothing
End Sub