Option Explicit
Const PDC = "MyPDC"
Dim sUser
Dim
oUsr
Dim lRes
Set oUsr = CreateObject("ntXdll.UserManager")
sUser = InputBox("Computers
with '$' at the end", "UserName")
lRes = oUsr.GetUserInfo(sUser,
PDC)
If lRes <> 0 Then MsgBox
"Error " & lRes
MsgBox "User
disabled: " & oUsr.AccountDisabled
If oUsr.AccountDisabled
= False Then oUsr.AccountDisabled
= True
If oUsr.LastError
<> 0 Then
MsgBox
"Error " & oUsr.LastError
Else
MsgBox
"successfully changed"
End
If