Dialog Box Confirmation Selection

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
 
C

Chip Pearson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top