I'd love to attach a sample but it has a lot of private data in it. The machine it's on isn't permitted to be on the internet - it's just a stand alone machine. Which means I have to type the code out each time.
I'll try to explain.
Workbook1 AKA SourceDB.xls
Sheet 1 - Contains staff info
Column1(A) - Staff Number
Column2(B) - Position Held
Column3(C) - First Name
Column4(D) - Last Name
There are more columns but I don't need them at this point.
Workbook2 AKA userInput.xls
Sheet1 - A test sheet I made which has 3 Columns
Column1(A) - Staff Number - to be entered manually
Column2(B) - First Name - evaluated from
where 11 is the corresponding row.
Column3(C) - Last Name
This works perfectly.
Workbook2 AKA userInput.xls
Sheet3 - This sheet contains a textbox
The textbox has a method attached that calls the findStaffByStaffID Sub located in Module1 of Workbook2.
I know the value is getting to findStaffByStaffID because the first MsgBox shows it.
The problem is with VLookup either not finding the corresponding value or not searching in the right place.
Bookmarks