Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and always overwrite?
I have an Access VBA script that uses XL to create a small workbook and then
save it. It is not uncommon to run it a couple of times a day, but every time we do it puts up a dialog asking if you want to overwrite it? Is there any way to turn this off? Is ConflicResoution the way? It doesn't seem to be. If it is, how do I decode the enum into a real int value? Maury |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and always overwrite?
You can set the DisplayAlerts property to False to prevent the
overwrite confirmation message. E.g., Application.DisplayAlerts = False ActiveWorkbook.SaveAs "H:\book1.xls" Application.DisplayAlerts = True Since the script is running under Access, change 'Application' to your variable which references the Excel application. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Maury Markowitz" wrote in message ... I have an Access VBA script that uses XL to create a small workbook and then save it. It is not uncommon to run it a couple of times a day, but every time we do it puts up a dialog asking if you want to overwrite it? Is there any way to turn this off? Is ConflicResoution the way? It doesn't seem to be. If it is, how do I decode the enum into a real int value? Maury |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and always overwrite?
"Chip Pearson" wrote:
You can set the DisplayAlerts property to False to prevent the overwrite confirmation message. E.g., Thanks, I'll try that out tonight. Maury |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and always overwrite?
Inside excel's VBA, I'd do this:
application.displayalerts = false myworkbook.saveas .... application.displayalerts = true Maury Markowitz wrote: I have an Access VBA script that uses XL to create a small workbook and then save it. It is not uncommon to run it a couple of times a day, but every time we do it puts up a dialog asking if you want to overwrite it? Is there any way to turn this off? Is ConflicResoution the way? It doesn't seem to be. If it is, how do I decode the enum into a real int value? Maury -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
overwrite | Excel Programming | |||
Q: overwrite during saveas | Excel Discussion (Misc queries) | |||
Method SaveAs with no overwrite YesNoCancel dialog | Excel Programming | |||
Using SaveAs Statement to overwrite existing File | Excel Programming | |||
overwrite Excel SaveAs function from File menu | Excel Programming |