I cannot get the macro to work as I want. I cannot get the MsgBox "Check Columns H and AA before Saving and Sending" to come up if No is Selected if I use the code below.
Code Showing No MsgBox
Otherwise if I use the following code it displays the msgbox whether I select Yes or No. Where am I going wrong?
Code Showing MsgBox for Both Yes and No
Else
MsgBox "Check Columns H and AA before Saving and Sending"
ActiveWorkbook.Save
Code Showing No MsgBox
Code:
Sub SavecheckCL()
'
' SavecheckCL Macro
'
ActiveWorkbook.Save
Dim AnswerCL As vbmsgboxresult
AnswerCL = MsgBox("Have you checked Supplier Item Number and National Ranging?", vbYesNo, "FINAL CHECK")
If Answer = vbYes Then
ActiveWorkbook.Save
ElseIf Answer = vbNo Then
MsgBox "Check Columns H and AA before Saving and Sending"
ActiveWorkbook.Save
End If
End Sub
Otherwise if I use the following code it displays the msgbox whether I select Yes or No. Where am I going wrong?
Code Showing MsgBox for Both Yes and No
Else
MsgBox "Check Columns H and AA before Saving and Sending"
ActiveWorkbook.Save
Last edited by a moderator: