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
689 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

636 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