I have an Excel VBA that connects to a SQL DB using the connection strings, but I would like to know if it's possible to parse into the connection string from a cell? For instance, if I have
objMyConn.ConnectionString = "Provider=sqloledb; Data Source=**"B2"**; Initial Catalog=**"B3"**; Integrated Security=SSPI;"
objMyConn.ConnectionString = "Provider=sqloledb; Data Source=" & range("B2").value & "; Initial Catalog=" & range("B3").value &"; Integrated Security=SSPI;"
This basically concatenates your string with the values in those cells.