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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding a NT User's group

Status
Not open for further replies.

BobLoblaws

Programmer
Nov 20, 2001
149
CA
Is there a way to determine what group(s) a NT User belongs to on the Domain Server through VBA or VB?
 
In case anyone is wondering. Here is the solution.

Dim oUser As ActiveDs.IADsUser

Set oUser = GetObject("WinNT://ServerName/UserName")

Text1.Text = Text1.Text & oUser.Name

For Each grp In oUser.Groups
Text2.Text = Text2.Text & grp.Name & vbCrLf
Next
 
So what reference do you need to be able to dimension an ActiveDs.IADsUser variable?
 
It is called Active DS Library. It's near the top of the references list.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top