Populating Specific Cells Using VBA

Posted by Daniel on Super User See other posts from Super User or by Daniel
Published on 2010-04-21T14:46:28Z Indexed on 2010/04/21 14:53 UTC
Read the original article Hit count: 394

Filed under:
|
|
|

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

© Super User or respective owner

Populating Specific Cells Using VBA

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-04-21T14:42:20Z Indexed on 2010/04/21 14:43 UTC
Read the original article Hit count: 394

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about excel

Related posts about vba