Not too much explanation needed for this one.
VB Code:
Option Explicit Private Sub Command1_Click() Dim oUser As Object Set oUser = GetObject("WinNT://ComputerName/UserName") If oUser.AccountDisabled = True Then MsgBox oUser.Name & " Disabled!" Else MsgBox oUser.Name & " Enabled!" End If Set oUser = Nothing End Sub






Reply With Quote