-
I've got an ActiveX dll that opens up Excel and starts a workbook, puts information into the workbook, closes the workbook and saves the workbook. ' wrkObj.Close (True) '
However, an instance of Excel remains open everytime. It's hidden but its on the task list and sucks up resources. There has to be a simple line of code that tells Excel to die already!
Any help would be appreciated
-Brad
-
-
an App.Quit wouldn't hurt either.
-
I use the following when closing down my hidden copy of Excel:
XLApp.Workbooks(1).Close SaveChanges:=True 'close and save workbook
XLApp.Quit
Set XLApp = nothing
-
DIY
You could just close it yourself if you made it visible:
exApp.Visible = true
...and then you could just use the close button when you are finished with it