|
-
Jun 22nd, 2005, 06:18 PM
#1
Thread Starter
New Member
[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.
Last edited by Sasaraii; Jun 23rd, 2005 at 11:30 AM.
-
Jun 22nd, 2005, 06:30 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 23rd, 2005, 11:21 AM
#3
Thread Starter
New Member
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?
-
Jun 23rd, 2005, 11:25 AM
#4
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 23rd, 2005, 11:28 AM
#5
Thread Starter
New Member
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.
-
Nov 21st, 2008, 10:54 AM
#6
New Member
Re: Linking Two Excel Documents Together
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|