Brandon,
The code would be something like this.
Sub messagebox()
Dim response As Variant
If "Your test" Then
response = msgbox("Your message", vbOKCancel)
If response = vbCancel Then
Exit Sub 'this will exit the code
Else
'this will allow it to continue running
End If
End If
End Sub