Attribute VB_Name = "LAN" 'returns the full name of the person given the Domain & LAN ID Public Function GetUserFullName(ByVal strUserID As String) As String 'these objects require a reference to "Active DS Type Library" Dim oUser As ActiveDs.IADsUser Dim oIADS As ActiveDs.IADsContainer Dim strDomain As String Const strDummyUserID As String = "" Const strDummyPassword As String = "" 'split passed User ID value into domain and User Name strDomain = Split(strUserID, "\")(0) strUserID = Split(strUserID, "\")(1) 'use IADS object to get name Set oIADS = GetObject("WinNT:").OpenDSObject _ ("WinNT://" & strDomain, strDummyUserID, strDummyPassword, 1) Set oUser = oIADS.GetObject("user", strUserID) 'return full name GetUserFullName = oUser.FullName ExitCleanUp: On Error Resume Next Set oUser = Nothing Set oIADS = Nothing End Function