B
bw
Column B (or a range within Column B) has a Data Validation List, that can
be one of 4 values (Test1, Test2, Test3, Test4).
When I change a cell in column B, I want to know which Row has been changed.
The following works when I change Row 2. How do I make it work for the
specific cell that was changed?
Thanks,
Bernie
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim C, R
C = 2
R = 2
If ActiveSheet.Cells(R, C).Value = "" Or
IsEmpty(ActiveSheet.Cells(R, C).Value) Then
MsgBox "Delete the User Template"
Else
If ActiveSheet.Cells(R, C).Value = "Test1" Then ' I'll change this
to check for all values in the list later
MsgBox "Set the User Template"
End If
End If
End Sub
be one of 4 values (Test1, Test2, Test3, Test4).
When I change a cell in column B, I want to know which Row has been changed.
The following works when I change Row 2. How do I make it work for the
specific cell that was changed?
Thanks,
Bernie
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim C, R
C = 2
R = 2
If ActiveSheet.Cells(R, C).Value = "" Or
IsEmpty(ActiveSheet.Cells(R, C).Value) Then
MsgBox "Delete the User Template"
Else
If ActiveSheet.Cells(R, C).Value = "Test1" Then ' I'll change this
to check for all values in the list later
MsgBox "Set the User Template"
End If
End If
End Sub