I've read in a few places that it is possible to use up to FOUR buttons in the msgbox API. I am trying to figure out how to use that fourth button but I don't see how to do the sum value for the "buttons" argument in the function call. I'm trying to use the vbYesNoCancel with an additional vbIgnore button option.
here's my code and what I'm trying to do:
Private Sub Workbook_WindowDeactivate(ByVal Wn As Window) Dim intAction As Integer 'User response to prompt when leaving Dim sh As Worksheet 'VendorCenter Worksheet 'set objects Set sh = ThisWorkbook.Worksheets("VendorCenter") 'why you leave? intAction = MsgBox("You are edding Vendor Center settings which should not be left open." & vbNewLine & _ "Would you like to save and close?" & vbNewLine & vbNewLine & _ "Please click Yes to save and close," & vbNewLine & _ "Click No to leave without saving" & vbNewLine & _ "Click ignore to leave Vendor Center open (not recommended)" & vbNewLine & _ "Or click Cancel to go back to Vendor Center", vbYesNoCancel, "Leaving Vendor Center") Select Case intAction Case vbYes Me.IsAddin = True Me.Save Case vbNo Me.IsAddin = True Case vbIgnore 'null Case vbCancel sh.activate Case Else MsgBox "Invalid Choice, going back to Vendor Center" sh.activate End Select 'intAction End Sub 'Workbook_WindowDeactivate
I can make a user form if needed, but I want to know if this fictitious fourth button is usable before I go through the trouble.