Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving changes to Excel file 1

Status
Not open for further replies.

JR2913

MIS
Sep 21, 2002
115
GB
I am amending data in an Excel spreadsheet from within Access using VBA and then saving the updated file using

xlBook1.SaveAs Filename:=Dir & "\tblChildData.xls", FileFormat:=xlNormal, CreateBackup:=False


With warnings already turned off, is there a way of amending the syntax to prevent the user being asked if they want to save the updated file?

Many thanks

John R
 
I think there is a property at the excel object level called displayalerts, set this to false...

objExcel.DisplayAlerts = false (or No)

Mike Pastore

Hats off to (Roy) Harper
 
You could also try using:

xlBook1.SaveCopyAs Filename:=Dir & "\tblChildData.xls"
 
Thanks Mike - works a treat now - have a star.

Sorry smm6s524 - tried this but it didn't hide the confirmation message.

John R
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top