I have a program that gets an excel file to get its data and do some processing. The system hangs when using
oExcel.WorkBooks.Open(SampleExcel) when the excel being uploaded is already open. The error goes "This action cannot be completed because the other program is busy.. [Switch to][Retry]".
How can we validate so we can tell the user to close the file first? Or can we let it proceed even when it is open?
- gryff15 -
oExcel.WorkBooks.Open(SampleExcel) when the excel being uploaded is already open. The error goes "This action cannot be completed because the other program is busy.. [Switch to][Retry]".
How can we validate so we can tell the user to close the file first? Or can we let it proceed even when it is open?
Code:
oExcel = Createobject("Excel.Application")
oExcel.WorkBooks.Open(SampleExcel) && system hang here if file is open
&& some processing of the data
oExcel.WorkBooks.Close()
oExcel.Quit
Release oExcel
- gryff15 -