Similar to SetWarnings, file output prompt to YES

G

Guest

In a macro, is it possible to set the answer to always be YES?, when you get
the prompt "The file 'C:\[filename].xls' already exists. Do you want to
replace the existing file?"?

Like you can with "SetWarnings", is it possible to do the same with file
output in a macro?
 
S

Steve Schapel

Kevin,

No, this is not possible. As far as I know, the only way to avoid this
confirmation prompt is to delete the file first. Macros do not provided
the means to do this directly. You would need to do it in VBA using the
Kill method. So, your options would be to use a VBA procedure for the
whole process, or to delete the file in a VBA function, and then use a
RunCode action in your macro to run the delete from there.
 

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