Gather UserID and Name from AD

Hello:

Below is a code used to gather user login and fullname from the AD. For some reason it is not working correctly. The error shows up in the beginning.  Is there something missing?

Sub Workbook_Open ()

Range("D36").Activate

IName = GetAdsProp("samAccountName", Environ("UserName"), "DisplayName")
UserName = Environ("UserName") & "@myemail.state.us"
Range("D35").Value = IName
Range("D37").Value = UserName

End Sub

April 15th, 2015 1:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics