I have a workbook to which I would like to add user and password control. I want the user to login with their network id and password. Currently I have the code below which grabs the user's profile from the active directory. I can't seem to find a method for matching the password though. Anyone have ideas?
I'm thinking I could take the userid field and run it through the above macro to find the appropriate profile where I could match the password fields. I just need to figure out how to find and match the password.
TIA,
BD
Code:
Public Function ADsFullName() As String
Dim objIADsUser As ActiveDs.IADsUser
Dim strUserID As String, strDomainName As String, strFullName As String
strUserID = Environ$("USERNAME")
strDomainName = "WORKPLACE"
Set objIADsUser = GetObject("WinNT://" & strDomainName & "/" & strUserID & ",user")
strFullName = objIADsUser.FullName
Set objIADsUser = Nothing
MsgBox strFullName
End Function
I'm thinking I could take the userid field and run it through the above macro to find the appropriate profile where I could match the password fields. I just need to figure out how to find and match the password.
TIA,
BD