Prevent Errors When Using Links
Dave,
Let me clarify.
Assume two workbooks wkbkA and wkbkB.
wkbkA contains data, and wkbkB is just created. You Decide that wkbkb
Cell C7 should contain a link to wkbkA. You go to Save wkbkB and your
add-in (on save) runs. the macro writes to wkbkA and creates a tab
that is hidden and contains a note that says path\wkbkB.xls'sheet1!
c7 then everything saves and wkbkA is closed (you never see that
wkbkA was open (in fact it shouldnt be opened just directly written
to))... then if someone opens wkbkA and decides to insert a new column
shifting column c to the right and becoming column d this would screw
up your wkbkB if you updated links. to prevent this when the user
goes to save wkbkA the macro runs and reads the hidden tab and will
alert the user that path\wkbkB.xls'sheet1!c7 will be affected. Then it
will prompt the user to cancel the save or to edit the link for them.
Mike,
I like the idea of a macro that writes the source down but thats also
why I like a true link, the link is the source.
|