mrinal saha
Board Regular
- Joined
- Jan 20, 2009
- Messages
- 229
Hi Folks,
In the below code If condition is working for 1st and 2nd statement but even if my form is fulfilling the 3rd condition, macro doesn't goes to 3rd msgbox. still its say "select the sheet."
If OptionButton1 Or OptionButton2 = True And ComboBox1.Value = " " Then
MsgBox "Please select sheet"
Exit Sub
ElseIf OptionButton1 Or OptionButton2 = False And ComboBox1.Value <> " " Then
MsgBox "Please select the mode"
Exit Sub
ElseIf OptionButton1 Or OptionButton2 = True And ComboBox1.Value <> " " Then
MsgBox "Do you want to run the macro", vbYesNo
End If
thanks,
Mrinal Saha
In the below code If condition is working for 1st and 2nd statement but even if my form is fulfilling the 3rd condition, macro doesn't goes to 3rd msgbox. still its say "select the sheet."
If OptionButton1 Or OptionButton2 = True And ComboBox1.Value = " " Then
MsgBox "Please select sheet"
Exit Sub
ElseIf OptionButton1 Or OptionButton2 = False And ComboBox1.Value <> " " Then
MsgBox "Please select the mode"
Exit Sub
ElseIf OptionButton1 Or OptionButton2 = True And ComboBox1.Value <> " " Then
MsgBox "Do you want to run the macro", vbYesNo
End If
thanks,
Mrinal Saha