Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

calling a function in excel vba

user13328581Apr 26 2016 — edited May 2 2016

hello experts;

I know this might not be the right forum but i was just wondering if any of the experts here have encountered the following challenge below.

I am trying to create a simple vba script that calls a function in excel once the excel is opened. see code below.

Dim rs As Object, com As Object, cn As Object

Set cn = CreateObject("ADODB.Connection")

cn.Open "Provider=OraOLEDB.Oracle.1;Password=xxxx;Persist Security Info=True;User ID=xxxxx;Data Source=prdncms"

Set com = CreateObject("ADODB.Command")

Set com.ActiveConnection = cn

com.CommandText = "UserProfileMaintenance_pkg.prRemoveUser('koti')"

com.CommandType = adCmdStoredProcedure

Set rs = com.Execute

I am getting a error that says tns could not resolve the connect identifier specified.

Thank you

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2016
Added on Apr 26 2016
10 comments
1,789 views