View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
AlanN AlanN is offline
external usenet poster
 
Posts: 10
Default Trouble with simple If and Else

Thanks, all responses are helpful.

AlanN
"AlanN" wrote in message ...
Can someone tell me what's wrong with this? I keep getting the error "else without if"

Sub test()

Dim Msg, Style, Title

Msg = "Do you want to go ahead and continue setting up the individual store pages?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "Individual Store Pages"
Response = MsgBox(Msg, Style, Title)

If Response = vbYes Then GoTo Reports

Else

GoTo Endit

End If

Reports:

code

Endit:

more code

End Sub


TIA, Alan N