Solved

How to check if a user belong to a particular domain

Posted on 2004-03-22
5
197 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 ListBox Question 4 63
Set email body to html using vbscript 6 96
Assign a value in Excel V-Basic 3 38
"Failed to convert parameter value from a String to a Decimal." 4 44
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

759 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