[RESOLVED] Linking Two Excel Documents Together
I've got something I'm working on here for a client at work, but suddenly do not know if this is even possible.
Now, basically he wants a macro or something in excel to take values out of one spreadsheet and put them into another spreadsheet.
I figured I would just create a button for him to click on and it could do its thing.
The problem is that I'm not sure if its possible to do something like this in the first place. These are two seperate excel documents that I'm working with here. Is there any way to work with two documents at the same time to do what I want?
The only thing I can think of is to press the button on the first document, grab the information and store it in a file or something somewhere. And then for him to open the other document, hit a button and it would grab that information from the external file and store it in that document.
I've only been programming for a year, and have not done much VBA at all and certainly not something dealing with two completely seperate documents at once. I'd love for him to be able to press one button and it all happens, but I have a feeling that this is either not possible dealing with excel or that it would take a lot of work.
If anyone knows anything about this please let me know. Or any other ideas would be appreciated as well.
I was thinking I could try and link it together with a few windows scripts, but that might just make it more confusing for the client anyway, and I want to avoid that.
Re: Linking Two Excel Documents Together
You could use the Data > Get External Data method to link the data from one worksheet in one workbook to another workbooks'
worksheet. Cell by Cell or whatever you need.
Re: Linking Two Excel Documents Together
Hmm
Ok that looks like it will work.
My only question now is whether I can do this all with just one button click.
Can I control two completely seperate documents at once with VBA code in just one of them?
For example, can I have all of my code in document 1, and be able to control what document 1 and 2 are doing at the same time?
Re: Linking Two Excel Documents Together
If they are both opened in the same instance of Excel. We are talking Excel right? I see you say Documents but that is for Word.
Excel has WorkBooks.
Re: Linking Two Excel Documents Together
Yes, I mean two seperate workbooks.
I just tried creating a macro using both of them at the same time and it seems to work.
Thanks for the help.
Re: Linking Two Excel Documents Together
Quote:
Originally Posted by RobDog888
You could use the Data > Get External Data method to link the data from one worksheet in one workbook to another workbooks'
worksheet. Cell by Cell or whatever you need.
Hey Good Guy,
Please help me as well.
I am trying to create a utility in which on 1 excel workbook, have made use of 2 excel sheets. One where i sorta created a GUI for seraching a Part number from the data stored in the sheet 2. my question is how do i link the two - meaning -
a) when i click on sheet 1 "search a Part number" the corresponding data from the sheet 2 for that part should be displayed on the sheet 1.
My utility looks like this -
"Part Search Utility "
Enter Part Number :
Enter Vendor Name :
Result :
Button1:Search B2:New Search B3:Cancel
Import External Data from sheet 2, will it help....???
BubblyGirl.