romelsms1
10-06-2011, 01:51 AM
hi,
I’m trying to create a connection (in word 2003) between a “combobox” and a “textbox”. In the combobox I have 3 entries. When I select an entry “renault” in the text box I want to appear “car”
My problem: When I select an entry in the textbox does not appear automatically the specific part. I must write something over it
For example:
Renault -> car
Sony -> laptop
LA -> city
and also a line for new entry
Private Sub ComboBox1_click()
'Renault -> car
'Sony -> laptop
'LA -> city
‘and also a line for new entry
Me.ComboBox1.List = Split(" renault sony LA")
End Sub
Private Sub TextBox1_Change()
If Me.ComboBox1.Text = "renault" Then
' Me.TextBox1.Text = Refresh ?????
Me.TextBox1.Text = "car"
Else
If Me.ComboBox1.Text = "sony" Then
TextBox1.Text = "laptop"
Else
If Me.ComboBox1.Text = "la" Then
TextBox1.Text = "city"
Else
TextBox1.Text = "" 'for a new wntry
End If
End If
End If
End Sub
I’m trying to create a connection (in word 2003) between a “combobox” and a “textbox”. In the combobox I have 3 entries. When I select an entry “renault” in the text box I want to appear “car”
My problem: When I select an entry in the textbox does not appear automatically the specific part. I must write something over it
For example:
Renault -> car
Sony -> laptop
LA -> city
and also a line for new entry
Private Sub ComboBox1_click()
'Renault -> car
'Sony -> laptop
'LA -> city
‘and also a line for new entry
Me.ComboBox1.List = Split(" renault sony LA")
End Sub
Private Sub TextBox1_Change()
If Me.ComboBox1.Text = "renault" Then
' Me.TextBox1.Text = Refresh ?????
Me.TextBox1.Text = "car"
Else
If Me.ComboBox1.Text = "sony" Then
TextBox1.Text = "laptop"
Else
If Me.ComboBox1.Text = "la" Then
TextBox1.Text = "city"
Else
TextBox1.Text = "" 'for a new wntry
End If
End If
End If
End Sub