Trying to understand combo boxs
I have created a user form for a simple datalist
Name, Address, City, Post code
Data entry is through a user form with textboxs - This works fine
Private Sub CommandButton1_Click()
Range("A3").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = TextBox1.Value
ActiveCell.Offset(0, 1) = TextBox2.Value
ActiveCell.Offset(0, 2) = TextBox3.Value
ActiveCell.Offset(0, 3) = TextBox4.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
End Sub
What i am trying to do is the reverse
Ie Have another userform with a combo box which should be a list of the names on the datasheet
On the choice of a name i want the address details to appear in the textboxs on the new user form
Any suggestions
Steve
I have created a user form for a simple datalist
Name, Address, City, Post code
Data entry is through a user form with textboxs - This works fine
Private Sub CommandButton1_Click()
Range("A3").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = TextBox1.Value
ActiveCell.Offset(0, 1) = TextBox2.Value
ActiveCell.Offset(0, 2) = TextBox3.Value
ActiveCell.Offset(0, 3) = TextBox4.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
End Sub
What i am trying to do is the reverse
Ie Have another userform with a combo box which should be a list of the names on the datasheet
On the choice of a name i want the address details to appear in the textboxs on the new user form
Any suggestions
Steve