LDAP binding HELP!

J

Joanne

Hello, I am trying to make a connection to Active directory from within VBA.
I set up the following:
Set ConName = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.command")
Set rst = CreateObject("ADODB.RecordSet")
ConName.Provider = "ADsDSOObject"
ConName.Open
'cmd.CommandText = "<LDAP://DC=kenyon,DC=com>;(cn=JHoersch);name, ADsPath"
cmd.CommandText = "LDAP://DC=kenyon,DC=com;(cn=JHoersch);name, ADsPath"
Set rst = cmd.Execute

vName = rst.Fields("name")
MsgBox "VName is equal to " & vName

I get an error that the connection cannot be made. I'm just guessing at the
format for this because I can't find anything on the internet that will give
me the correct format. PLEASE HELP! I posted this earlier but have gotten no
response. Thank you very much.
 
R

Russ

Joanne,

I haven't done it, but here is more internet information.
Notice one remark about references through Visual Basic
Editor-->Tools-->References-->:

<http://www.microsoft.com/technet/scriptcenter/scripts/office/excel/ofexvb05
..mspx?mfr=true>
<http://groups.google.com/group/microsoft.public.excel.programming/browse_fr
m/thread/e592207eaa0cf447/625f0f3c044b6728?lnk=st>
<http://groups.google.com/groups?hl=en&newwindow=1&safe=off&q=ldap+ingroup:v
ba&um=1&sa=N&tab=wg>

If you find a method that works, would you post it for other people's
benefit?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top