I have a VBA to pull data from a database, but I am trying to not hard-code it. I am needing to pull a few tests from the database and currently running it, then changing the code to update the ids.
Currently:
What I want to do is the line is looking at cell values in Sheet1.
<tbody>
</tbody>
I want to extract 20-25 at a time so the table listed above would provide all the scripts. This is what I have so far:
Currently:
Code:
SQLquery = SQLquery & " Where t.TS_TEST_ID = '39324' OR t.TS_TEST_ID = '39166' OR t.TS_TEST_ID = '12345'
What I want to do is the line is looking at cell values in Sheet1.
Script#1 | 39324 |
Script#2 | 39166 |
Script#3 | 12345 |
Script#4 | 32456 |
<tbody>
</tbody>
I want to extract 20-25 at a time so the table listed above would provide all the scripts. This is what I have so far:
Code:
SQLquery = SQLquery & " AND t.TS_TEST_ID = " & "'" & Sheets("Sheet1").Range("B1").Value & "'" & "
Last edited: