Home > How-To Library > Network

How to check whether the user is an administrator

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
Private Declare Function IsNTAdmin Lib "advpack.dll" (ByVal dwReserved As Long, _ ByRef lpdwReserved As Long) As Long Sub main() Debug.Print "Are you an Administrator? " & CBool(IsNTAdmin(ByVal 0&, ByVal 0&)) End Sub

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.