I'm trying to connect to oracle database with excel using macros.
I was able to do it by writing the userid and password in the code which makes it static. I want to connect to the database using a login popup and make it dynamic.
I have created a sheet and was trying to do the same using the Vlookup functionality, but the code is not executing properly.
Here is the code I have used to connect to the database:
strConnection = "Provider=OraOLEDB.Oracle;" & _
"Data Source=(DESCRIPTION=(CID=xxxxxx)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=xxx)(HOST=xxxx)(PORT=xxxx)))" & _
"(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxx)));" & _
"User Id=myusrid;" & _
"Mypswd;"
Any help or suggestion is appreciated.