View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Conditional "If Not ... Then" Statement not working properly Help!

Also:

If Not one = True Or Not two = True Or Not three = False Then
MsgBox "One or more of the 3 conditions are false"
End If



"Dan Thompson" wrote in message
...
The following code should pop up a message box but it is not doing so
where
am I going wrong ?


Sub test()
Dim one As Boolean, two As Boolean, three As Boolean
one = True
two = True
three = False

If Not one = True And Not two = True And Not three = False Then
MsgBox "One or more of the 3 conditions are false"
End If
End Sub

Dan Thompson