B
bw
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim NewVal, ValTyped
Target.Select
ValTyped = ActiveCell
If Len(ValTyped) = 0 Then
NewVal = ""
ActiveCell = NewVal
Else
NewVal = "Test"
ActiveCell = NewVal
End If
End Sub
When I step through this code, it begins at "Private" and goes down to one of the
"ActiveCell = NewVal" statements, and then back to "Private" again...over and over and
over again.
Can someone explain what's happening here? Is my code wrong?
Thanks,
Bernie
Dim NewVal, ValTyped
Target.Select
ValTyped = ActiveCell
If Len(ValTyped) = 0 Then
NewVal = ""
ActiveCell = NewVal
Else
NewVal = "Test"
ActiveCell = NewVal
End If
End Sub
When I step through this code, it begins at "Private" and goes down to one of the
"ActiveCell = NewVal" statements, and then back to "Private" again...over and over and
over again.
Can someone explain what's happening here? Is my code wrong?
Thanks,
Bernie