Hi, there!
I have a following problem i need to solve:
Let's say i have a form with 16 Comboboxes.
I have a function to find unique values, sort them ascending and fill in combobox. So, i would like to find out how could i send Combobox number as parameter?
The code so far is:
Private Sub CommandButton1_Click()
Dim FormCombo As Object
Dim Comb As Object
Set FormCombo = AddData.LineNumber
Call Sort_Combo_AZ(Sheets("ProductShot").Range("A4:A60000"), FormCombo)
AddData.CheckBox1.Value = True
Set FormCombo = AddData.ProductCode
Call Sort_Combo_AZ2(Sheets("ProductShot").Range("B4:B60000"), FormCombo)
For i = 1 To 16
Set FormCombo = AddData.ComboBox & i ' this is the part that doesn't work
Call Sort_Combo_AZ(Sheets("ProductShot").Range("D4:D60000,F4:F60000"), FormCombo)
Next i
StartUp.Hide
AddData.Show
End Sub
Function Sort_Combo_AZ(AllCells1 As Range, FormCombo As Object)
[some code]
End function
Thanks for your help!
Bookmarks