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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close Excel Application from Access with VBA?

Status
Not open for further replies.

franksirvent

Programmer
Mar 8, 2002
358
GB
Hi there

i am trying to close Excel Application after I have finished with the XLS sheet and I have saved, but it leaves the main Excel Window open (the sheet itself dissapears but I want the whole of Excel to close itself)

This is (part of) the code I am using...

Thanks in advance

objExcel.ActiveWorkbook.SaveAs FileName:=the_xlsfile, FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False

objExcel.ActiveWindow.Close
 
Perhaph this ?
objExcel.Quit

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top