I need help with creating an if statment based on a message box input that will complete 2 tasks if no is selected. I tried the code below, but it won't work. I'm sure this is a simple fix I just can't figure it out.
Code:
Private Sub Prepare3_Click()
If MsgBox("Did query return any results?", vbYesNo) = vbNo [B]Then[/B]
[B]Prepare2.Enabled = True exit sub[/B]
MsgBox ("Save query results as FCO Query Results.csv and select step 4.")
Prepare3.Enabled = False
Prepare4.Enabled = True
End Sub