Results 1 to 4 of 4

Combobox Number As Variable

Threaded View

  1. #1
    Registered User
    Join Date
    01-29-2012
    Location
    United Kingdom
    MS-Off Ver
    MS Office 2003/MS Office 2010
    Posts
    45

    Combobox Number As Variable

    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!
    Last edited by trenars; 01-30-2012 at 04:34 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1