Solved

How to check if a user belong to a particular domain

Posted on 2004-03-22
5
196 Views
Last Modified: 2010-05-01
I want to check if a user belong to a particular domain.

How can I go about it.

Please provide sample codes if possible
Thanks
0
Comment
Question by:snowei1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 50 total points
ID: 10657210
Private Sub Command1_Click()
Dim myobj, user

Set myobj = GetObject("WinNT://yourdomainname")
myobj.Filter = Array("user")
For Each user In myobj
  Debug.Print user.Name & " " & user.Parent & " " & user.AccountDisabled
Next

End Sub
0
 
LVL 1

Assisted Solution

by:MADisonMAN
MADisonMAN earned 50 total points
ID: 10662032
Check the following site. This will helps you for this question as well as understanding some basics.
http://www.15seconds.com/issue/020130.htm
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question