I have a main macro enabled workbook (xlsm) that opens or adds another , creating it if it is not present (xlsx).
The main workbook macros writes data and formulas to the data workbook with the formulas referencing ranges in the main workbook.
I used the before_close event in the main workbook to save and close the data workbook.
When I next open the main workbook the vba in Workbook_Open subsequently opens the data workbook which now exists from the first session and in the same folder.
I immediately get prompted about external links with the main workbook (in the formula) not resolving even though the main workbook is of course already open. If I select to update the external links, the file open window appears and I have to select the main workbook again, which does nothing because it’s already open.
A similar thing occurs even if I open the main work book and open the data workbook manually using file /open
Why does this happen and how can I stop it yet still have the formula in the data workbook recalculate against the external links to the main workbook (remember this is already open)
According to what I’ve read, unless I update the external links (ie retrieve the formulaically reference external data from the main workbook), the data workbook will only calculate the formula with the previous data. So I suspect adding the UpdataLinks:=False will be of no use although it does suppress the error about the external links, but it just won’t retrieve the new data
hope someone can help
Thanks
The main workbook macros writes data and formulas to the data workbook with the formulas referencing ranges in the main workbook.
I used the before_close event in the main workbook to save and close the data workbook.
When I next open the main workbook the vba in Workbook_Open subsequently opens the data workbook which now exists from the first session and in the same folder.
I immediately get prompted about external links with the main workbook (in the formula) not resolving even though the main workbook is of course already open. If I select to update the external links, the file open window appears and I have to select the main workbook again, which does nothing because it’s already open.
A similar thing occurs even if I open the main work book and open the data workbook manually using file /open
Why does this happen and how can I stop it yet still have the formula in the data workbook recalculate against the external links to the main workbook (remember this is already open)
According to what I’ve read, unless I update the external links (ie retrieve the formulaically reference external data from the main workbook), the data workbook will only calculate the formula with the previous data. So I suspect adding the UpdataLinks:=False will be of no use although it does suppress the error about the external links, but it just won’t retrieve the new data
hope someone can help
Thanks