Save Hidden Spreadsheet

  • Thread starter Thread starter Publiship
  • Start date Start date
P

Publiship

Guest
I have data transferring from Access to Excel where it is processed through a number of calculations before returning to Access as a final result, using the TransferSpreadsheet method.

I get a prompt asking if I want to overwrite the spreadsheet, and I want it to close without any prompt. It doesn't matter whether the changes are saved or not, since the data is flexible and the formulas are protected. The idea is that the user doen't know the spreadsheet exists.

My code is:

' Set the Visible property of the sheet to True, save the
' sheet, and quit Microsoft Excel.
Sheet.Application.windows("PricerDatabaseLinkUp2.xls").Visible = True
Sheet.Application.Activeworkbook.Save
Sheet.Application.Activeworkbook.Close
xlApp.Quit

Can anyone guide me as to how to avoid the prompt?

Any assistance appreciated.
 
Not sure if it'll work but try

Set Warnings = False

at the beggining of the code. don't forget to turn them back on again

Set warnings = True
 

Users who are viewing this thread

Back
Top Bottom