This is the part of the code
Dim lx_objectExcel As New Excel.Application
Dim lx_wrkBkSrc As Workbook
Dim lx_wrkShSrc as WorkSheet
'Using lx_objectExcel.Workbooks.Open WORKS but not Workbooks.Open
'lx_objectExcel.Workbooks.Open(Filename:=lv_path, ReadOnly:=True)
Set lx_wrkBkSrc = Workbooks.Open(Filename:=lv_path, ReadOnly:=True)
Using a new instance works
lx_objectExcel.Workbooks.Open(Filename:=lv_shrPath, ReadOnly:=True)
But Using
Workbooks.Open(Filename:=lv_shrPath, ReadOnly:=True)
the code exits after it opens the file. While debuggig it doesn't go to the next line either; While searching somone had mentioned use "Thisworkbook.Activate", but the code dosen't even enter the next line. The file is of the type ".xlsm" Also Shift is not pressed while opening. I also set application.enableevents to false to prevent any macro from running.
p.s I have asked the question before, but no suitable answer due to my poor questioning