Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on GetObject("LDAP://rootDSE") 2

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I created a class in vba (Access). I would like to duplicate the class in vbscript. However, I recieve the error ActiveX component can't create object "LDAP://rootDSE" on the GetObject command

What's wrong with the following code?
Code:
Class clsMMC_ActiveDirectory

'*************************
'*  Public Declarations  *
'*************************

    Dim mstrsAMAccountName
    Dim mobjUser
    Dim mobjRootDSE 

'**********************************
'*  Class Initialize / Terminate  *
'**********************************

Private Sub Class_Initialize()
    Set mobjRootDSE = GetObject("LDAP://rootDSE") ' bind to the rootDSE for portability
End Sub
 
Nothing wrong with the context. My guess is you have a DNS problem on the workstation.

I hope you find this post helpful.

Regards,

Mark
 
Thank you. That was my problem. It ran ok in a vbs file but not in an html file. Changed security settings and it now runs in html.
 
I only used the vbs file to test to see if it was a security problem. The code will need to reside in an html page (intranet site). However, I have used hta before but had forgotten about it. So appreciate the link. Very helpful for some other things I need to do. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top