"No Ask" or "No Warnings" state in Project VBA?

G

G Lykos

Greetings! Am using a macro to execute a series of exports from schedule
files to Excel spreadsheets. If run manually, and if the spreadsheet file
already exists, a dialog box pops up to advise such and ask if overwriting
is desired. If run automatically, the macro simply stops with error. Is
there an "no ask" or "no warnings" option or state into which the macro can
be put such that it go ahead and overwrite existing files?

Thanks,
George
 
R

Rod Gill

Try:
Application.Displayalerts=false

then at the end of the macro you need to turn them on again:
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