I'm trying to create a text box on my 2013 Excel worksheet that the user can enter the connection string info such as Server Name, Database Name etc., and have it connect to a SQL Server database 2008r2 via clicking on a button with the text box. I'm not sure of what VB coding to use to accept the connection string info from worksheet and have it connect to SQL Server.
On the same worksheet, there are other buttons to click and run queries against the database, but the connection string is hard coded. Being somewhat new to VB code, I'm thinking there's probably an easy way to do it that I'm missing.
Can anyone help? Thank you!
Bookmarks