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

    Error on filter in userform... (2000 sr 1)

    when i select in combobox3 the date 23/01/2007 end press button "ESTRAI" for extraction data the code go in error...
    If effect if visible cells are blank go in:

    If RNG_DATA.COUNT = 0 Then
    MsgBox ("NESSUN SOSPESO CON QUESTI PARAMETRI"), vbInformation
    If WS.FilterMode Then
    WS.ShowAllData
    End If
    Exit Sub
    End If

    else continue the code...

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

    Re: Error on filter in userform... (2000 sr 1)

    If the filter hides all rows, the range RNG consists of only one cell (L2). In this situation, SpecialCells(xlCellTypeVisible) doesn't return L2 itself, but all visible cells in the worksheet.
    Instead of testing whether RNG_DATA contains 0 cells, you could test whether RNG contains just 1 cell.

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

    Re: Error on filter in userform... (2000 sr 1)

    <img src=/S/artist.gif border=0 alt=artist width=34 height=29>!!! "THE RETURN", resolved, now <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

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

    Re: Error on filter in userform... (2000 sr 1)

    Hans... sorry me, but in textbox2 in event change is present the function (GetUniqueTipoSosps) to show in textbox1 the related diponible value for the value in textbox2, now admit i have filled with the dates (column J)another combobox3, how to add asecond subfilter to how only the disponible value in all combobox about this 3 combobox...

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

    Re: Error on filter in userform... (2000 sr 1)

    You should be able to do that yourself by now.

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

    Re: Error on filter in userform... (2000 sr 1)

    Worked...
    But instead to see in combobox3 31/12/999 i see the entire list of dates in column L
    Test with combobox2=4500 appear in combobox1 146900090000 and combobox3 is filled with entire range of dates from L????

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

    Re: Error on filter in userform... (2000 sr 1)

    Select 4580 in CombBox2, then select 4500 again - then you'll see only 31/12/9999 in ComboBox3.

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

    Re: Error on filter in userform... (2000 sr 1)

    Yes is correct ...
    But i want to show only the dates dinponible for the 4500 and 146900090000, in this case only one item (31/12/9999) in combobox3...
    hope you undestand me...

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

    Re: Error on filter in userform... (2000 sr 1)

    So do what I wrote above.

    If you want only 31/12/1999 when the userform is opened, you'll have to take care of this in the UserForm_Initialize procedure.

Posting Permissions

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