By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

Macro to link two workbooks

P: 21
I was wondering if there is a way to link two separate workbooks together with the click of a macro button. I want to click a button and the information be sent to another workbook saved in a different place. Is this possible?
Aug 26 '08 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi. There is not enough detail in your question to give you any more than a general response. Visual Basic for Applications (VBA) is the language Excel uses for macros. VBA is the common applications language for all of the Office suite and for other MS products (Outlook, Visio and so on). VBA has a wide range of facliities to manipulate workbooks and a very rich object model which allows for modifying individual cells, ranges, formulas, charts, and many, many other Excel items. So yes, without a doubt you can link two workbooks together using code automation to do so.

What is certain is that you would need to be very precise about what it is you want to do, as it will require custom programming. It is very unlikely that the macro recorder will be of much assistance to you with porting worksheet data from one workbook to another unless all you are doing is a simple worksheet copy and paste. For a custom programmed approach you will need to be familiar with the Excel object model and the Visual Basic for Applications programming language.

There are a number of posts in this forum which will give you pointers to the techniques involved - use the search facilities to assist you. You may also find this HowTo article on Application Automation interesting as a general intro to the VBA automation model.

-Stewart
Aug 26 '08 #2

P: 21
Thanks for the information. I figured out how to do what I was wanting!
Sep 2 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.