Here are my all of my subroutines dealing with opening and closing Excel
Public Sub CloseWorkbook()
On Error Resume Next
xlApp.Application.DisplayAlerts = False
xlApp.ActiveWorkbook.Close
End Sub
Public Sub OpenWorkbook()
On Error Resume Next
xlApp.Workbooks.Open ("C:\QuenchTest\Configuration\QuenchTest.xls"

xlApp.Visible = False
End Sub
Public Sub CloseExcelApp()
On Error Resume Next
xlApp.Application.DisplayAlerts = False
xlBook.Close
xlApp.Quit
Call ReleaseMem
End Sub
Public Sub ReleaseMem()
On Error Resume Next
Set xlBook = Nothing
Set xlApp = Nothing
'Stick stuff for destroying any global objects in here.
Dim frm As Form
'This loops through all your forms and unloads each one.
For Each frm In Forms
Unload frm
Next frm
End Sub
Public Sub OpenExcelApp()
MsgForm.Show
MsgForm.Refresh
MsgForm.MsgTextforOperator.Caption = "Opening Application"
Set xlApp = CreateObject("Excel.Application"

("C:\QuenchTest\Configuration\QuenchTest.xls"

xlApp.Workbooks.Open ("C:\program files\Keithley Instruments\ExceLINX\ExceLINX2.xla"

("C:\QuenchTest\Configuration\StandardQuench.xls"

xlApp.Workbooks.Open ("C:\QuenchTest\Configuration\QuenchTest.xls"

xlApp.Workbooks("QuenchTest.xls"

.Activate
xlApp.Visible = False
End Sub
The ExceLINX2.xla is an excel add-on, this must run for my program to function properly.