Close one of thee two open excel workbook

I am opening a new Excel workbook through one excel workbook(AFO) which is already open. Now after opening the new workbook I am getting issues with attaching. But if I manually close the previous workbook(the not required one), then everything seems to work perfectly.
Is there a way to close the previously opened workbook completely? P.S if the hide or show workbook, then turns out both workbooks have the same instance.
Opening the new workbook through previously opened workbook is the only way of opening the required Excel workbook because I am working with SAP AFO tool which is integrated with Excel. Otherwise if I normally open it without the AFO excel workbook, it won't have the AFO integrated toolbar/tab.

If I try to get the PID of Excel, there is no success on that as well. Please suggest.
 

jrprajapati

New Member
I am opening a new Excel workbook through one excel workbook(AFO) which is already open. Now after opening the new workbook I am getting issues with attaching. But if I manually close the previous workbook(the not required one), then everything seems to work perfectly.
Is there a way to close the previously opened workbook completely? P.S if the hide or show workbook, then turns out both workbooks have the same instance.
Opening the new workbook through previously opened workbook is the only way of opening the required Excel workbook because I am working with SAP AFO tool which is integrated with Excel. Otherwise if I normally open it without the AFO excel workbook, it won't have the AFO integrated toolbar/tab.

If I try to get the PID of Excel, there is no success on that as well. Please suggest.

You can try closing the previous Excel file using Close Instance action of Excel VBO.
give the handle of the previous file.
 
Top