Log in

View Full Version : Solved: msg box



Ger
02-29-2008, 05:26 AM
Hi,

I want a msg box displayed if the value of 2 cells is not equal.
I know i must put the macro in the worksheet with the option change.
the cells are GE141 and GE142.
I think it looks like:

Private Sub Worksheet_Change(ByVal Target As Range)
If Then
MsgBox "deze invoer is onjuist"
End If
End Sub

Ger:help

matthewspatrick
02-29-2008, 06:14 AM
Private Sub Worksheet_Change(ByVal Target As Range)

If [ge141] <> [ge142] Then
MsgBox "deze invoer is onjuist"
End If

End Sub

Ger
03-05-2008, 01:08 AM
Thanks,

it works fine.

Ger