objConnection = CreateObject("ADODB.Connection") objConnection.Open("Provider=ADSDSOObject;User Id=hhccas\myusername;Password=mypassword") cSQL = "SELECT distinguishedName,Name,displayname FROM 'LDAP://192.168.84.46/dc=hhccas,dc=local' WHERE objectCategory='user' " objRecordSet = objConnection.Execute(cSQL) objRecordSet.MoveFirst() Do while NOT objRecordSet.EOF WAIT window objRecordSet.Fields("distinguishedName").Value nowait WAIT window objRecordSet.Fields("Name").Value nowait WAIT window objRecordSet.Fields("displayName").Value nowait objRecordSet.MoveNext() enddoI had to change up the connection string somewhat and reference the execute command differently as well. Now it works identically to the vb script I was using.
objRecordSet = objCommand.Executeline.