06-02-2011, 02:41 PM
(This post was last modified: 06-02-2011, 02:49 PM by sundari.msls.)
I think the below logic works for you. Usually when your are using the same variable mutliple times in a condition, you should use AND.
See the code below:
See the code below:
Code:
MyCheck =8
If MyCheck <> 8 AND MyCheck<> 1 AND MyCheck<> 9 AND MyCheck<> 0 Then
MsgBox "Mycheck<>8"
ElseIF MyCheck = 1 AND MyCheck = 0 AND MyCheck = 9 Then
MsgBox "MyCheck=1"
ElseIf MyCheck = 8 Then
MsgBox "Success"
End If