View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default COMBOBOX AND TEXTBOXES QUESTION !!

This should do what you want...

Private Sub ComboBox1_Change()
TextBox1.Value = Cells(ComboBox1.ListIndex + 1, "B")
TextBox2.Value = Cells(ComboBox1.ListIndex + 1, "C")
End Sub

--
Rick (MVP - Excel)


"jay dean" wrote in message
...
Hello -

On a UserForm, I have Combobox1, Textbox1 and Textbox2.
Values in Combobox1 come from Range("A:A"). What I want is to be able to
select a value in Combobox1 and its corresponding values from
Range("B:B") and Range("C:C") will automatically populate in Textbox1
and Textbox2 respectively.

Example 1: If I select a dropdown value in Combobox1 that happens to be
from Range("A6"), then Textbox1 should automatically populate value in
Range("B6") and Textbox2 will also populate value in Range("C6") on the
form.

Example 2: If I select a dropdown value in Combobox1 that happens to be
from Range("A10"), then Textbox1 should automatically populate value in
Range("B10") and Textbox2 will also populate value in Range("C10")on the
form.

Any help would be appreciated.
Thanks
Jay

*** Sent via Developersdex http://www.developersdex.com ***