How are you opening the Excel spreadsheet?
The following would open excel, open a workbook, do something, save the
workbook, close it, then, depending on whether Excel was open when you opened
your workbook, it would either leave Excel Open, or Quit. Instead of testing
whether Excel was open when you opened your workbook, you might just want to
check to see whether there are any other workbooks open, and if so, leave
Excel open. (air code, so may require tweaking)
Private Sub OpenExcel
Dim bExcelWasOpen as boolean
Dim xlApp as Excel.Application
Dim wbk as Excel.Workbook
On Error Resume Next
Set xlApp = GetObject(, "Excel.Application")
If Err.Number = 0 then
bExcelWasOpen = True
Else
bExcelWasOpen = False
Set xlApp = CreateObject("Excel.Application")
End if
xlapp.visible = true
Set wbk = xlApp.Workbooks.Open(Filename:=Filename, ReadOnly:=False)
.... Do something here
wbk.save
wbk.close
If bExcelWasOpen = False then xlApp.Quit
End Sub