atmospheric
Well-known Member
- Joined
- Jul 16, 2002
- Messages
- 565
Hi, I have a VERY simple working Userform that looks up the first of three columns (of a Victorian postmark database, in Sheet "England") and populates the remaining two Textboxes after manually inputting TextBox1 (a number).
So, for example, if I typed 123 into Textbox 1, Textboxes 2 and 3 would fill in with the Town and City that used the numeric Postmark "123"
I would like to have the Userform display an associated image in the Imagebox below the Textboxes.
The images would be stored in Sheet1 and would have the same name, e.g. if the postmark was 123, the associated jpeg image would be named 123.
My code so far:
Private Sub TextBox1_Change()
ROW_NUMBER = 41
Do
DoEvents
ROW_NUMBER = ROW_NUMBER + 1
item_in_review = Sheets("England").Range("B" & ROW_NUMBER)
If item_in_review = TextBox1.Text Then
TextBox2.Text = Sheets("England").Range("C" & ROW_NUMBER)
TextBox3.Text = Sheets("England").Range("D" & ROW_NUMBER)
End If
Loop Until item_in_review = ""
End Sub
I have searched here and on the internet, but not found exactly what I'm after, so any help would be appreciated. TIA
So, for example, if I typed 123 into Textbox 1, Textboxes 2 and 3 would fill in with the Town and City that used the numeric Postmark "123"
I would like to have the Userform display an associated image in the Imagebox below the Textboxes.
The images would be stored in Sheet1 and would have the same name, e.g. if the postmark was 123, the associated jpeg image would be named 123.
My code so far:
Private Sub TextBox1_Change()
ROW_NUMBER = 41
Do
DoEvents
ROW_NUMBER = ROW_NUMBER + 1
item_in_review = Sheets("England").Range("B" & ROW_NUMBER)
If item_in_review = TextBox1.Text Then
TextBox2.Text = Sheets("England").Range("C" & ROW_NUMBER)
TextBox3.Text = Sheets("England").Range("D" & ROW_NUMBER)
End If
Loop Until item_in_review = ""
End Sub
I have searched here and on the internet, but not found exactly what I'm after, so any help would be appreciated. TIA