Get EUID (Enterprise User ID) from current logged user.

Get EUID (Enterprise User ID) from current logged user.

Post by Ricard » Thu, 24 Mar 2005 01:17:52



Is there any way to get (in vba) the EUID (Enterprise User ID) from the
current logged user??

I am aware of Application.Profiles.ActiveProfile, and properties Login and
LoginType (and table MSP_WEB_RESOURCES), but it seems that it's not working
always....
Can anyone tell me a way do get to this EUID from Project Professional ??

Thanks.
Ricardo Drizin
 
 
 

Get EUID (Enterprise User ID) from current logged user.

Post by Ricard » Wed, 30 Mar 2005 09:56:47


My mistake... in fact it was working correctly, and it was another
problem...

If someone is interested, my query/code:

strSQL = "SELECT DISTINCT(RES_EUID) FROM MSP_WEB_RESOURCES WHERE "
Select Case Application.Profiles.ActiveProfile.LoginType
Case 1
strSQL = strSQL & " (WRES_USE_NT_LOGON = 1 AND
WRES_NT_ACCOUNT = '" & GetNTUserName() & "' )"
Case 2
strSQL = strSQL & " (WRES_USE_NT_LOGON = 0 AND RES_NAME
= '" & Application.userName & "')"
Case Else
MsgBox "Error - Could not Identify Logged Used"
Exit Function
End Select

Att,
Ricardo Drizin





working