I would like to open a workbook via VBA, which is opened from another Excel application. i.e
- open your macro file
- open excel.exe(2) again
- open the destination file via the excel.exe(2)
- run macro
If the destination file is just clicked normally with the first application there is no problem in opening the destination file, but through the second application (i.e you see 2 Excel application in the task manager) I get error 9 while opening, and I guess saving is not possible.
Is there a workaround?
lb_reportWBOpen = Library.isWorkBookOpen(lx_pathReportFile)
If lb_reportWBOpen Then
Set lx_wrkBkReport = Workbooks(Library.getFilenameFromPath(lx_pathReportFile))
Else
Set lx_wrkBkReport = Workbooks.Open(lx_pathReportFile)
End If