开发者

Populating Specific Cells Using VBA

开发者 https://www.devze.com 2022-12-27 12:15 出处:网络
I am using VBA开发者_如何学JAVA 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?

I am using VBA开发者_如何学JAVA 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


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.

Populating Specific Cells Using VBA

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号