Option Explicit
Private WithEvents btn As CommandBarButton
Private Sub btn_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
' test your condition to cancel the send
If MsgBox("Do you wish to send?", vbYesNo) = vbNo Then
CancelDefault = True
End If
End Sub
Private Sub Workbook_Open()
Set btn = Application.CommandBars.FindControl(ID:=2188)
End Sub
|