B
Binay
Hi,
I have developed an application in Visual Basic, which merges severa
worksheets into one workbook. Because of large number of inputs
sometimes my application has to run more than 5/6 hours. After say 4/
hours, it is giving the following error.
"Error opening the file <File_Path>_<file name> . Unable to get th
Open property of the Workbooks class"
It gives me this error 3/4 times.After that it shows a message "Th
following error has occurred. ActiveX component can't create object"
This is the portion of code where I am getting this error.
Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.DisplayAlerts = False
On Error Resume Next
Set objTargetWorkbook
objExcelApp.workbooks.Open(strTargetWorkbook)
If Err.Number <> 0 Then
LogInformation "Error opening the file " & strTargetWorkbook
" . " & Err.Description, "<2>", True
Err.Clear
lngWarningCount = lngWarningCount + 1
Exit Sub
End If
Please let me if you guys have any solution to this.
Thanks in Advance.
Bina
I have developed an application in Visual Basic, which merges severa
worksheets into one workbook. Because of large number of inputs
sometimes my application has to run more than 5/6 hours. After say 4/
hours, it is giving the following error.
"Error opening the file <File_Path>_<file name> . Unable to get th
Open property of the Workbooks class"
It gives me this error 3/4 times.After that it shows a message "Th
following error has occurred. ActiveX component can't create object"
This is the portion of code where I am getting this error.
Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.DisplayAlerts = False
On Error Resume Next
Set objTargetWorkbook
objExcelApp.workbooks.Open(strTargetWorkbook)
If Err.Number <> 0 Then
LogInformation "Error opening the file " & strTargetWorkbook
" . " & Err.Description, "<2>", True
Err.Clear
lngWarningCount = lngWarningCount + 1
Exit Sub
End If
Please let me if you guys have any solution to this.
Thanks in Advance.
Bina