E
Eddie_SP
Hi !
I have one Listbox in my Form, and if the value of "Column A" is the same of
the Combobox of the Form, it must be shown on List box the Column "B" and "C"
values...
But the value of Column "A" can be repeated below in other rows...
I have the following, but it doesn't work:
Dim ComboRef As String
Dim i As Integer
Dim RNG As Range
ComboRef = Me.ComboBox1.Value
i = 0
Worksheets(6).Activate
While (ActiveSheet.Cells(1 + i, 2) <> 0)
i = i + 1
If Cells(1 + i, 1) = ComboRef Then
RNG = Range(Cells(1 + i, 2), Cells(1 + i, 3))
With Me.ListBox1
.BoundColumn = 1
.ColumnCount = 2
.ColumnHeads = True
.TextColumn = True
.ListIndex = i
.AddItem RNG
End With
End If
Wend
Please someone help me...
I have one Listbox in my Form, and if the value of "Column A" is the same of
the Combobox of the Form, it must be shown on List box the Column "B" and "C"
values...
But the value of Column "A" can be repeated below in other rows...
I have the following, but it doesn't work:
Dim ComboRef As String
Dim i As Integer
Dim RNG As Range
ComboRef = Me.ComboBox1.Value
i = 0
Worksheets(6).Activate
While (ActiveSheet.Cells(1 + i, 2) <> 0)
i = i + 1
If Cells(1 + i, 1) = ComboRef Then
RNG = Range(Cells(1 + i, 2), Cells(1 + i, 3))
With Me.ListBox1
.BoundColumn = 1
.ColumnCount = 2
.ColumnHeads = True
.TextColumn = True
.ListIndex = i
.AddItem RNG
End With
End If
Wend
Please someone help me...