View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ALATL ALATL is offline
external usenet poster
 
Posts: 24
Default Msg Box With Exit Sub - How to quit application

I would like for the application to stop processing if the user selects
vbCancel. Right now, the application does not exit & continues to bug out
since the Sub stops processing. Thanks for any feedback!

Dim Ans As String

Ans = MsgBox("Data columns must occur in the following order: " & vbNewLine
& vbNewLine & _

"User Name (A)" & vbNewLine & _
"Set of Books (B)" & vbNewLine & _

"Click OK to continue. Click Cancel to correct data.", vbOKCancel +
vbQuestion, "Confirm Column Order")

If Ans = vbCancel Then Exit Sub