i have a module in access which opens an excel file and runs a module
within the excel file. What is the best way to add code to the access module
to completely close excel and then close access. Because I noticed in the
task manager that excel is still running afterwards.
thanks i advance,
geebee
Dim objExcel As New Excel.Application
or
Dim objExcel As Excel.Application
Set objExcel = New Excel.Application
or
Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
Once you're done with that object, you need to quit Excel, and set the
variable to Nothing:
objExcel.Application.Quit
Set objExcel = Nothing
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"geebee" <geral...@hotmail.com(noSPAMs)> wrote in message
news:BFE1098E-70C2-4079...@microsoft.com...
Dim objXL As Object
' Do something in your code
objXL.Application.Quit
Set objXL = Nothing
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"geebee" <geral...@hotmail.com(noSPAMs)> wrote in message
news:BFE1098E-70C2-4079...@microsoft.com...