Excel.Application.Quit

B

Bob B.

When I issue Excel.Application.Quit from Access to close an Excel Worksheet,
I am asked if I want to Save the Worksheet. Is there a switch or option that
will supress this? I wil never want to save for this particular application
even if updates are made to the Worksheet. Thank you in advance for any
assistance you can provide.
 
P

Paolo

Hi Bob,
with Excel.Application.DisplayAlerts = False you switch off the XL messages.
To switch on again the messages use Excel.Application.DisplayAlerts = True

HTH Paolo
 
R

Robert Morley

In addition to Paolo's suggestion, you can also iterate through all the
Workbooks and issue a Workbook.Close command for each, with the appropriate
option set for SaveChanges (depending whether you want to save them or close
them).


Rob
 
Top