I am trying to execute the piece of code below. The user initials (UserInits) have already been successfully entered thru an InputBox. The initials are then checked against a range (Users) in the workbook to determine what the matching entry should be in the next InputBox which will ask for the password. This code works if the vlookup finds a match on user initials. If it does to find a match I get "run-time error 1004 application-defined or object-defined error". The watch window tells me the value of password has become <out of context>. I expected it to return #N/A as it does on a worksheet, but it doesn't.
password = WorksheetFunction.VLookup(UserInits, Users, 2, False)
Does anyone have any input. Thanks in advance
password = WorksheetFunction.VLookup(UserInits, Users, 2, False)
Does anyone have any input. Thanks in advance