View Single Post
 
Old 05-03-2023, 05:31 AM
holzhauerf holzhauerf is offline Windows 10 Office 2021
Novice
 
Join Date: May 2023
Posts: 1
holzhauerf is on a distinguished road
Default Check before using Application.Dialogs(xlDialogSendMail)

Dear All,

I have succesfully integrated a VBA script which checked several form fields before printing or saving the file to ensure that the form was filled correctly.

I've used

Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
to check before printing

and

Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
to check before saving

but what would be the right object/script to implement a simple if/then check for the expression
Code:
Application.Dialogs(xlDialogSendMail)
?

Many thanks for your help.

Best regards

Florian
Reply With Quote