Hi,
I am making use of an Excel file in a form via the following process (edited for brevity).
When the form is disposed the following code should, I thought, release the file.
However when I try to open the xlsm file in MS Excel it tells me that it is locked and read-only.
Where am I going wrong with releasing the file when the form closes?
Thanks
I am making use of an Excel file in a form via the following process (edited for brevity).
Code:
Imports Excel = Microsoft.Office.Interop.Excel
Imports Microsoft.Office
xlApp = New Excel.Application
xlApp = CreateObject("Excel.Application")
xlWorkBook = xlApp.Workbooks.Open(....)
Code:
xlApp.Quit() releaseObject(xlApp) releaseObject(xlWorkBook)
Where am I going wrong with releasing the file when the form closes?
Thanks
Comment