C
Christiane
Iwant to write code so that if someone enters a value, hello 1225, in
cell in a certain range, a message box will be displayed with a warnin
sign.
I wrote the following code, it works but when hello 1225 is entered
the dialog is displayed, but when I clickok, it is displayed again an
again and again.
What did I do wrong?
Thanks for any help.
Christiane
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 5
For Each c In Worksheets("Sheet1").Range("A1
10")
If c.Value = "hello 1225" Then
Worksheets("Sheet1").Range("A2").Value = 10
MsgBox "Verify tank level"
End If
Next c
End Su
cell in a certain range, a message box will be displayed with a warnin
sign.
I wrote the following code, it works but when hello 1225 is entered
the dialog is displayed, but when I clickok, it is displayed again an
again and again.
What did I do wrong?
Thanks for any help.
Christiane
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 5
For Each c In Worksheets("Sheet1").Range("A1
10")If c.Value = "hello 1225" Then
Worksheets("Sheet1").Range("A2").Value = 10
MsgBox "Verify tank level"
End If
Next c
End Su