comdlg32.ocx Save-File Dialog. How to set overwrite as default ?

LeifB used Ask the Experts™
How can I set a default overwrite on the above .ocx ? The save dialog works ok but the program should not ask to overwrite if file already present but simply overwrite by default. Is there a simple flag ?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
By default it shouldn't prompt to overwrite a file.

It only prompts if you use the following flag
     CommonDialog1.Flags = cdlOFNOverwritePrompt

So if you have that flag present, take it out.

Good luck...


Thanks eric0213. Also I found that System alerts tells you the file already exists, so you have to turn them off as well for the save sub with application.displayalerts = false.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial