Hi!
Trying to write a macro that looks at the value of C1.
If it's blank, I want a message box to pop up with two options: CONTINUE or EXIT. If they click "Continue", I want the macro to roll on to Copyfilefromto. If they click "Exit", I want the macro to stop so C1 can be filled out and the macro can rerun and all will be well.
This is what I've got and it's only giving OK as an option. Is what I want to do even possible?
Trying to write a macro that looks at the value of C1.
If it's blank, I want a message box to pop up with two options: CONTINUE or EXIT. If they click "Continue", I want the macro to roll on to Copyfilefromto. If they click "Exit", I want the macro to stop so C1 can be filled out and the macro can rerun and all will be well.
This is what I've got and it's only giving OK as an option. Is what I want to do even possible?
Code:
Sub CheckQtr()
Dim mycheck As VbMsgBoxResult
If Range("C1").Value = "" Then
mycheck = MsgBox("No quarter has been indicated in cell C1. Click CONTINUE to proceed or EXIT to return to Excel. ", vbContinueExit)
If mycheck = vbExit Then
Exit Sub
End If
Else
Call Copyfilefromto
End If
End Sub