Noop
Noop

Reputation: 67

How to choose option in dialog box with VBA

I have made some code that makes powerpoint and excel work together. And I want excel to be invisible and not show up when the code runs. So I've set it like this:

Set EXL = New Excel.Application EXL.Visible = False

But my code creates a new xmlMap in excel and the whole procedure halts when a dialog box shows up. This is the dialog box: "The specified XML source does not refer to a schema. Excel will create a schema based on the XML source data" and the buttons is "OK" and "Help".

Is it possible to add a line to the code that makes it press OK without the user needing to do anything?

Upvotes: 0

Views: 2300

Answers (1)

Kevin Ross
Kevin Ross

Reputation: 7215

Try

Application.DisplayAlerts = False

See if that helps

Upvotes: 3

Related Questions