On Got Focus, Clear Cells
This should be pretty close...
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
Select Case .Column
Case 1 'column a
Application.EnableEvents = False
Cells(Target.Row, "B").ClearContents
Cells(Target.Row, "D").ClearContents
Cells(Target.Row, "E").ClearContents
Application.EnableEvents = True
Case 5 'column e
Application.EnableEvents = False
Cells(Target.Row, "B").ClearContents
Cells(Target.Row, "D").ClearContents
Cells(Target.Row, "A").ClearContents
Application.EnableEvents = True
End Select
End With
End Sub
--
HTH...
Jim Thomlinson
"Suzanne" wrote:
Change will do it too... I was trying to manipulate other solutions with
change (with no success). I appreciate your help.
Suz
"Jim Thomlinson" wrote:
Expanding the Validation Drop Down is not an event that is tracked by XL. The
closest things are the select and change events. Select fires when the cell
is selected. Change fires when the cell changes. Would change work for you.
Once and item is selected from the validation list then the cells are
cleared??? That is not too difficult to do...
--
HTH...
Jim Thomlinson
"Suzanne" wrote:
I can't quite figure out the right code for this:
On selection (GotFocus) of a validation drop-down in Column A, clear cells
in Columns B, D, & E; OR on selection (GotFocus) of the validation drop-down
in Column E, clear cells in Columns A, B, & D
Only the cells on the row with focus should be cleared
Thanks -- Suzanne
|