Solved

Can I use ado SQL within Excel 2003 VBA to reference worksheets (tables) in two different workbooks in the same query?

Posted on 2010-09-15
1
682 Views
Last Modified: 2012-05-10
I am very used to using the JET DB engine in VBA with ADODB to query worksheets using SQL in Excel 2003.  However, the query always referenced sheets in one workbook at a time.  Is it possible to open two connections to two different workbooks and perform a join between two sheets in the different workbooks?  If so, how would I qualify the reference in the SQL query?
0
Comment
Question by:VBAGuy
1 Comment
 
LVL 11

Accepted Solution

by:
jkpieterse earned 500 total points
ID: 33689145
I doubt if you can do that, but maybe this discussion gives you some pointers:

http://www.vbaexpress.com/forum/showthread.php?t=26862
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now