Combobox update

  • Thread starter Thread starter Robert Couchman
  • Start date Start date
R

Robert Couchman

Hello all,

can anyone help?

i have a combobox, when i select a value from it i need it
to update 6 textboxes.

the values for the combobox are located in column "AX" and
the values i would like to input into the textboxes are
located in the relevant rows but column "AY".

e.g.

select value "26/04/2004" from combobox ==>

where "AX" = combobox, i would like the first textbox to =
first value from "AY" ==>

then.. continue through "AX" to find next cell that meets
combobox value, then the next textbox to = the cell.offset
(0,1)==<END>

is there any way of doing this?

also would like it to happen on click!

sorry!

thank you,

Robert Couchman
 
Hi,

just to let you know that i have the solution, its a bit
long winded but it stops repeated data.

enjoy

***************************
***************************
***************************

Private Sub ComboBox1_Change()

With Worksheets("sheet1")
Set rng = .Range(.Cells(2, 1), .Cells(2, 1).End
(xlDown))
End With

TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""

If ComboBox1.Value <> "" Then
For Each cell In rng
If InStr(1, cell.Offset(0, 49), ComboBox1,
vbBinaryCompare) Then
If TextBox1 = "" Then
TextBox1 = cell.Offset(0, 50)
Else
If cell.Offset(0, 50) <> TextBox1 Then
If TextBox2 = "" Then
TextBox2 = cell.Offset(0, 50)
Else
If cell.Offset(0, 50) <> TextBox2 Then
If TextBox3 = "" Then
TextBox3 = cell.Offset(0, 50)
Else
If cell.Offset(0, 50) <> TextBox3 Then
If TextBox4 = "" Then
TextBox4 = cell.Offset(0, 50)
Else
If cell.Offset(0, 50) <> TextBox4
Then
If TextBox5 = "" Then
TextBox5 = cell.Offset(0,
50)
Else
If cell.Offset(0, 50) <>
TextBox5 Then
If TextBox6 = "" Then
TextBox6 = cell.Offset
(0, 50)
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next
End If

End Sub

****************************
****************************
****************************

Thank you,

Robert Couchman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Not sure if this is possible!! 4
Combobox selection 1
Little task 3
Anyone can help 5
Combobox filtering 2
Question number Two 1
Iterating through a ComboBox's values 6
non-repeating Comboboxes values 9

Back
Top