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