开发者

excel macro = link between 2 documents

I am working on a table(in document A) which needs to be referred to another document(document B, not sheet 2 of document A). I used macro and VLOOKUP to link the data and 开发者_StackOverflowit works perfectly well when both documents are opened. However, once i closed document B, the data on the table cannot be shown with a message " subscript out of range". What can i do to avoid this so that i only have the open the main sheet as to get all my data on the table?

P.S. I created a button which allowed me to click and displayed all the data instantenously. But when i closed document B, only half of the data from Document B were showen and the message subscript out of range" was shown.

Thanks.


Open both docs, then FIRST close B (and save), THEN close A (saving).
Now reopen A, it should ask you if you want to update the links. Reply Yes. That should be it.
If you're using 2007, you may have to expressely allow external data updates.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜