J
Jcraig713
Hello. I spent a while searcing through historical posts for this answer but
I could not get anything suggested to work on my sheet. I think this is more
than likely a pretty easy thing for experienced users (of course not me!) )
I have a simple worksheet (no macros, forms etc.). I created a clear button
and when I click on it, I want Cell F3 and range E6 - E 13 (unprotected
cells; the rest of the sheet is protected) to clear and then refocus on cell
F3.
I used the following code on the clear button:
Private Sub ClearButton1_Click()
Dim cell As Range
Range("E6:E13").Select
Range("E6").Activate
For Each cell In Selection
If cell.Locked = False Then
cell.ClearContents
End If
Next
End Sub
How do I get the cell F3 to regain the focus on click?
I could not get anything suggested to work on my sheet. I think this is more
than likely a pretty easy thing for experienced users (of course not me!) )
I have a simple worksheet (no macros, forms etc.). I created a clear button
and when I click on it, I want Cell F3 and range E6 - E 13 (unprotected
cells; the rest of the sheet is protected) to clear and then refocus on cell
F3.
I used the following code on the clear button:
Private Sub ClearButton1_Click()
Dim cell As Range
Range("E6:E13").Select
Range("E6").Activate
For Each cell In Selection
If cell.Locked = False Then
cell.ClearContents
End If
Next
End Sub
How do I get the cell F3 to regain the focus on click?