COMBOBOX SHOW WITH CONDITION
GOT IT !!!!
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ComboValue As String
Dim RangeCombo As String
ComboValue = Me.ComboBox1.Value
i = 13
While (ActiveSheet.Cells(1 + i, 11) < 0)
i = i + 1
If Cells(1 + i, 11).Text = "NÃO PAGO" Then
Range(Cells(1 + i, 1), Cells(1 + i, 1)).Select
RangeCombo = Range(Cells(1 + i, 1), Cells(1 + i, 1))
With ComboBox1
.AddItem RangeCombo
End With
End If
Wend
End Sub
THANK YOOOOU ! =)
"Matthew Herbert" wrote:
On Aug 13, 1:40 pm, Eddie_SP
wrote:
Hi Matthew,
The problem is that I'm new to VBA. And I've always used only RowSource,
understand me? :(
So I do not know how to include any value in Combobox by code...
But I will keep on trying here. =)
Thank you.
"Matthew Herbert" wrote:
On Aug 13, 12:32 pm, Eddie_SP
wrote:
Hi community !
I one worksheet of international payments.
When I make the payment, column 10, Cell "row" Formula shows "PAID".
I have a Form with 1 Combobox.
How could I filter only the UNPAID rows to be shown in the Combobox?
But...
I need only Columns "A" and "B" to be shown (REFERENCE # / EXPORTER).
Can someone help me?
I thank you in advance !!!
This community is helping me a lot !!! =)
Eddie_SP,
Have you tried using Filter? Search the help documentation for filter
to see how to use this. If your data is in a database layout, then
you'll be able to filter by the <blanks or "unpaid".
Best,
Matthew Herbert- Hide quoted text -
- Show quoted text -
Eddie_SP,
Are you creating a combobox on a custom user form or a combobox within
a spreadsheet? (If it's a user form combobox, then look at
the .AddItem method).
Best,
Matt
|