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.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Script#1[/TD]
[TD]39324[/TD]
[/TR]
[TR]
[TD]Script#2[/TD]
[TD]39166[/TD]
[/TR]
[TR]
[TD]Script#3[/TD]
[TD]12345[/TD]
[/TR]
[TR]
[TD]Script#4[/TD]
[TD]32456[/TD]
[/TR]
</tbody>[/TABLE]
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.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Script#1[/TD]
[TD]39324[/TD]
[/TR]
[TR]
[TD]Script#2[/TD]
[TD]39166[/TD]
[/TR]
[TR]
[TD]Script#3[/TD]
[TD]12345[/TD]
[/TR]
[TR]
[TD]Script#4[/TD]
[TD]32456[/TD]
[/TR]
</tbody>[/TABLE]
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: