Please note this question is related to Outlook I am an amateurish programmer in VB in outlook I want to have a custom Message Box with button captions as 'Send Anyway' and 'Don't Send'.
But with the existing message box changing text is not possible.
So I made a custom form. Now I want to return a Boolean value from the CommandButton1_Click() Sub
This is my main sub which call the form:
Public Result1 As Boolean
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Const MAX_ITEM_SIZE As Long = 5242880
Result1 = True
Dim FileSize As Long
For Each Item In Item.Attachments
FileSize = FileSize + Item.Size
Next
If FileSize > MAX_ITEM_SIZE Then
UserForm1.Show
'Cancel = True
Cancel = Result1
End If
End Sub
This is my code for click event handler:
Private Sub CommandButton1_Click()
Unload Me
End Sub
Please advise on how to achieve custom captions on MsgBox Buttons in Outlook