The task is to establish a connection to an Active Directory or Lightweight Directory Access Protocol server.

Set objConn = CreateObject("ADODB.Connection")
Set objCmd = CreateObject("ADODB.Command")
objConn.Provider = "ADsDSOObject"
objConn.Open