Hello,
Sheet 1 contains all possible people, their code and their details.
A UserForm has buttons allowing letters to be entered into column D on the active sheet.
When the digits entered match a code from Sheet one that persons details are displayed on both the Userform and active sheet.
This is done with a Match formula.
The Userform has a confirm button if the user is happy the correct code was entered.
Ideally this would move down a row in column D on the active sheet ready form the next code to be entered and the fields on the UserForm would be blanks awaiting the next matched code.
Try as I might I can't get this last part to work.
I can only get the it to work if I explicitly say enter the code into this cell on this Sheet.
Private Sub CommandButtonA_Click()
Me.TextBoxCode = Me.TextBoxCode & "A"
Sheet2.Range("D2") = Me.TextBoxCode.Text
Me.TextBoxFirstName.Text = Sheet2.Range("I2")
Me.TextBoxLastName.Text = Sheet2.Range("K2")
If Me.TextBoxFirstName.Text = "" Then
Me.TextBoxPlacing.Text = ""
Else
Me.TextBoxPlacing.Text = Sheet2.Range("B2")
End If
End Sub
Any help with this would be greatly appreciated.
Thank you
Bookmarks