When binding a user object, you can specify the User class at the end of the binding string to designate the class of the object to be manipulated. Specifying the class of the object eliminates any ambiguity surrounding the type of object to bind and increases overall performance of the binding operation.
Use the following Visual Basic code to bind to an existing user account in the domain:
Dim User as IADsUser Dim UserName as String Dim UserDomain as String UserDomain = " Target_User_Domain " UserName = " Target_User_Name " Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
Top |