Dialog Box Confirmation Selection

  • Thread starter Thread starter Annie
  • Start date Start date
A

Annie

I am new to VBA macro writing and cannot find a way of
automatically selecting the Yes option when a dialog box
is automatically displayed following an action e.g. after
deleting a worksheet. Could anyone help?

Many thanks, Annie
 
Annie,

Most dialogs can be supressed by setting the DisplayAlerts property to
false. When you do this, the dialog is not displayed. E.g.,

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True
 
Back
Top