Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    userform wuth a required selection (2000 r s1)

    the sheet DATE contauin a buttin to show a user form.
    All value into userform are a joint MONTH, DATA and PERIODO it work well.
    I have a problem into PERIODICITA (combobox 3)....
    If i slelect the option "08-....." in combo box 3 my idea is to slelect a value refered to only line 4 7 10 and 13 and show only the month in reference and not all month in this case MARZO, GIUGNO, SETTEMBRE and DICEMBRE not is important to show all month...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: userform wuth a required selection (2000 r s1)

    You can add this code below Case "08-TRIMESTRALE" in the procedure ComboBox3_Change:

    ComboBox1.Clear
    Dim i As Integer
    For i = 4 To 13 Step 3
    ComboBox1.AddItem Range("A" & i)
    Next i

    If you want to display all months when the user selects another option in ComboBox3, you must add code for that too. You can copy this code from UserForm_Initialize.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform wuth a required selection (2000 r s1)

    correct ? because have different result ...

    Case "08-TRIMESTRALE"

    ComboBox1.Clear
    Dim i As Integer
    For i = 4 To 13 Step 3
    ComboBox1.AddItem Range("A" & i)
    Next i

    'NUM_DEC = Val(ComboBox2.ListIndex + 1)
    Set rg = Intersect(Range("H" & NUM_MESE + 1 & ":H" & NUM_MESE + 1), ws1.UsedRange)
    For Each cel In rg
    If cel <> "" Then ComboBox2.AddItem cel
    Next cel

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: userform wuth a required selection (2000 r s1)

    What different result?

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform wuth a required selection (2000 r s1)

    in MESE:

    MARZO
    GIUGNO
    SETEMBRE
    DICEMRE
    MARZO
    GIUGNO
    SETEMBRE
    DICEMRE

    in DATA
    TRIM
    TRIM

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: userform wuth a required selection (2000 r s1)

    You must have duplicated code somewhere.

Posting Permissions

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