Credo di si! Come faccio a capire se sono collegato come amministratore?

Quindi a te questo codice funziona?

codice:
Private Function SID_COMPUTER() As Variant
Dim SID As String
Dim objWMIService As Object
Dim objAccount As Object
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set objAccount = objWMIService.Get("Win32_UserAccount.Name='Administrator',Domain='PC-GIANNI'")
SID = Left(objAccount.SID, Len(objAccount.SID) - 4)
SID_COMPUTER = SID
End Function
e quindi anche questo?

codice:
Private Function SID_COMPUTER() As Variant
Dim SID As String
Dim objWMIService As Object
Dim objAccount As Object
sComputer = Environ("COMPUTERNAME")
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set objAccount = objWMIService.Get("Win32_UserAccount.Name='Administrator',Domain='"+sComputer+"'")
SID = Left(objAccount.SID, Len(objAccount.SID) - 4)
SID_COMPUTER = SID
End Function