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

    Userform destroied me! (2000 sr 1)

    ... with userform in this wbook have 2 prob, here the wbook :http://www.mytempdir.com/529933
    1) not is filled completly the item into listbox1
    2) "value prperty not valid"

    First prob not joined all variuos value from column in sheet CODICI.

    Second prob i dont know why!

    For first prob use the combobox PERIODO selelct a value and select a item from a list SK DESCIZIONE, make test from GIORNALIERA and DECADALE. Delete, into listbox1, with double click for example a item select from GIORNALIERA, insert a value. ecc....

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

    Re: Userform destroied me! (2000 sr 1)

    other image... here.
    i ahev this wehn i click i one object in each part if userform(listbox, xcombobox eccc.. in to userform)

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

    Re: Userform destroied me! (2000 sr 1)

    I cannot reproduce either of the errors. Adding and removing various entries in the list box works without errors for me.

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

    Re: Userform destroied me! (2000 sr 1)

    Huummmm.. for prob 1

    test:

    Select GIORNALIERA (to the default is select)
    Select from Combobox1 one item
    Delete from Listbox1 this one item (double click to delete it)
    After select DECADALE... and see the result

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

    Re: Userform destroied me! (2000 sr 1)

    When you select an item in cboPeriodicita, the procedure cboPeriodicita_Change is executed.
    One of the lines in this procedure is ComboBox1.Clear.
    This in turn calls ComboBox1_Change.
    This procedure contains lines such as Me.ListBox1.AddItem Left(Me.ComboBox1, 7).
    But ComboBox1 has just been cleared, so you are adding an empty item to ListBox1. Only the Anno, Mese and Data column are filled.
    To avoid this, add the following line at the beginning of ComboBox1_Change:

    If Me.ComboBox1 = "" Then Exit Sub

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

    Re: Userform destroied me! (2000 sr 1)

    Good!!!!!!!!!

    I have put here and now, i hope, work for every time:
    Note: You are a "BIG", i have alreday write in this forum, when you post on question, always explain the error and this is a good choice from WIZARD.

    ?????????The prob2 remain, i cnnot solve it:-(...??????????

    Private Sub ComboBox1_Change()
    '''''''''''''''''
    If Me.ComboBox1 = "" Then Exit Sub
    ''''''''''''''''
    If mIgnoreEvents = True Then Exit Sub
    intListCount = Me.ListBox1.ListCount

    If intListCount = 0 Then


    Me.ListBox1.AddItem Left(Me.ComboBox1, 7)
    strLine1 = Left(Me.ComboBox1, 7)
    Me.ListBox1.List(intListCount, 1) = Mid(Me.ComboBox1, 9, 1)
    strLine2 = Mid(Me.ComboBox1, 9, 1)
    Me.ListBox1.List(intListCount, 2) = Mid(Me.ComboBox1, 13)
    strLine3 = Mid(Me.ComboBox1, 13)
    Me.ListBox1.List(intListCount, 3) = Me.cboAnno
    strLine4 = Me.cboAnno
    Me.ListBox1.List(intListCount, 4) = Me.cboMese
    ...

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

    Re: Userform destroied me! (2000 sr 1)

    perahps solved all prob....
    But in old ver i can selelct item from combobox1 and and combobox2, simply to click on this, now i can select the item only if use the little arrow...
    How to fix this.?

    Little tips:
    The macro used if i click on PERIODICITA and only for GIORNALIERA not is finished...
    Is possible to advice the user with a msgbox: Attention for GIONALIERA, noe is in test, try later, tlks", is is selected the related item into combobox1?

    new file upadted: http://www.mytempdir.com/531039

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

    Re: Userform destroied me! (2000 sr 1)

    About your first question: set the Style property of ComboBox1 and ComboBox2 to 2 - fmStyleDropDownList (See <post:=545,280>post 545,280</post:>)

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

    Re: Userform destroied me! (2000 sr 1)

    About your second question:

    1) In cboPeriodicita_Change:

    Private Sub cboPeriodicita_Change()
    If Me.cboPeriodicita = "01-GIORNALIERA" Then
    MsgBox "Ancora in fase di test! Prego prova pi

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

    Re: Userform destroied me! (2000 sr 1)

    Sorry for delay....
    All OK!naturally.
    And sorry for this, not remembered(my head is fired now): ...dropstyle in combobox.

Posting Permissions

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