M
Martin
I have the following code in Access that is used to open an Excel file, do
some work with that file, then close the file and the Excel application.
Dim xlApp As Excel.Application
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open FileName:=HRFileName
With xlApp
[Work with the Excel file]
'Close HR File
.Workbooks(HRFile).Close False
End With
' Close Excel with the Quit method on the Application object.
xlApp.Quit
' Release the object variable.
Set xlApp = Nothing
Everything works fine except that after the script is completed, the Excel
application is open in the Windows Taskbar with the spreadsheet open in
Read-only mode.
Can someone offer some directioin as to how to stop this? It is annoying
for the end-user to have to close Excel after this script is done.
Thanks.
some work with that file, then close the file and the Excel application.
Dim xlApp As Excel.Application
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open FileName:=HRFileName
With xlApp
[Work with the Excel file]
'Close HR File
.Workbooks(HRFile).Close False
End With
' Close Excel with the Quit method on the Application object.
xlApp.Quit
' Release the object variable.
Set xlApp = Nothing
Everything works fine except that after the script is completed, the Excel
application is open in the Windows Taskbar with the spreadsheet open in
Read-only mode.
Can someone offer some directioin as to how to stop this? It is annoying
for the end-user to have to close Excel after this script is done.
Thanks.