olivia.weaver
New member
- Local time
- Today, 03:38
- Joined
- Nov 26, 2019
- Messages
- 5
I have created a VBA code which generates a userform/textbox with "INSERT INTO ..." statements that I then have to copy and paste into SQL to run. I want to create a button on my userform which: a) automatically runs the query in SQL by referencing the text inside the userform and executing it, and b) returns how many rows were inserted
Note: I can create an ADODB.Connection and execute SQL queries that way but the code I use to create my INSERT INTO statement is quite complex and results in a string. I believe you cannot use an "Execute" function with a string.
Note: I can create an ADODB.Connection and execute SQL queries that way but the code I use to create my INSERT INTO statement is quite complex and results in a string. I believe you cannot use an "Execute" function with a string.