Stopping Save Confirmation

landar

Registered User.
Local time
Today, 04:53
Joined
Feb 6, 2003
Messages
14
When manipulating an Excel application from Access (that is, open a .CSV file, make some changes, save changes, close excel application), how does one stop the save confirmation box from popping up?

Otherwise, is it possible to have the VBA code automatically select yes to the confirmation box?

Thanks for any help you can provide. :)

~Seth Neustein
 
Add this to your code after you've opened Excel.

Application.DisplayAlerts=False

be sure to set it back to True after you've closed Excel.

You might need to change that somewhat to get it to refer to Excel, maybe Application.Excel.DisplayAlerts=False? I don't know if that is needed or not? I know it'll work in an Excel spreadsheet but now sure what happens when you open Excel from Access.
 
That worked great! :) Thank you. :)

Since I am manipulating Excel with a

Set xl = CreateObject("Excel.Application")

With xl

I added the line:

.DisplayAlerts = False

and that worked perfectly. Thank you for the help. :)

~Seth Neustein
 

Users who are viewing this thread

Back
Top Bottom