If you are using Excel VBA, I do not understand why you would want to involve SQL code at all.
What is the relation of the data you are trying to extract from the Excel file that the userform and code is stored in.
Is it the same?
If not, how does the SQL code know where to look to find this file?
We are trying to help you, but we are trying to understand your whole structure here. You really haven't provided very much details as to how all of this is laid out, and how everything is connected.
I have never used it before, but have seen others do it (personally, if I had this type of situation, I would probably just use Microsoft Access - form creation is so much easier there).
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.