tags:

views:

43

answers:

2

I am using VBA to pull from a SQL table and it automatically populates cell E14. Not sure why it's that cell, but is there a way to specify which cell it pulls the data into?

Here's what I have right now:

strSQL = "SELECT distinct Source FROM dbo.Simulations WHERE SimulationID = 5

+1  A: 

Within your VBA, are you using DAO or ADO instructions for the query?

ummm....an odbc connection?
Daniel
+1  A: 

When creating your ODBC connection you end up on a screen like what is shown below. This is where you determine where the data will populate in your spreadsheet. I don't think there is a way to get to that screen after the query has been created, so you may have to create it again and adjust the landing location for the query.

Now if you are doing this via VBA, you'll need to post your code.

alt text

guitarthrower