After following (or so I thought) step-by-step instructions I found on the forum for opening and closing Excel, I'm still being left with a hanging process.
This is the code (strImport file being a CSV file whose name and path I've set elsewhere)
Following the progress,
- between -1 and 0 an Excel process starts
- I was hoping that by 6 it would have been stopped, but no luck.
This is the code (strImport file being a CSV file whose name and path I've set elsewhere)
Code:
MsgBox "-1"
Set Xl = New Excel.Application
MsgBox "0"
Set XLBook = Xl.Workbooks.Open(strImportFile)
MsgBox "1"
XLBook.SaveAs Replace(XLBook.FullName, ".csv", ".xlsm"), 52 ' Save the CSV file as an Excel file
MsgBox "2"
XLBook.Close
MsgBox "3"
Set XLBook = Nothing
MsgBox "4"
Xl.Quit
MsgBox "5"
Set Xl = Nothing
MsgBox "6"
- between -1 and 0 an Excel process starts
- I was hoping that by 6 it would have been stopped, but no luck.