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

    Count lnes after filetr (2000 sr -1)

    Why after i have filtered lines instead to have RNG_DATA=15 in range have RNG_DATA.COUNT=126????
    piece of code :
    .....

    Set RNG = WS.Range(WS.[L2], WS.UsedRange.SpecialCells(xlCellTypeLastCell)).Res ize(columnsize:=1)
    Set RNG_DATA = RNG.SpecialCells(xlCellTypeVisible).Cells

    TEST_ZERO_LINEE = RNG_DATA.COUNT

    If TEST_ZERO_LINEE = 1 Then
    MsgBox ("NESSUN SOSPESO CON QUESTI PARAMETRI:" & vbCrLf & "FIL.GRUPPO " & ComboBox2.Text & " SOSPESO " & ComboBox1.Text & " SCAD. " & ComboBox3.Text), vbInformation

    If WS.FilterMode Then
    WS.ShowAllData
    End If

    Exit Sub
    End If

    CTR = RNG_DATA.COUNT

    SOMMA = 0
    CHIUSI = 0
    I = 0

    For Each CEL In RNG_DATA

    If I > 0 Then
    ODIC.Add I, CEL
    End If


    I = I + 1

    If CEL = ComboBox2.Text And CEL.Offset(0, -4).Value = ComboBox1.Text Then
    RIGA = CEL.Row
    SOMMA = Range("I" & RIGA) + SOMMA
    If CEL.Offset(0, 14) > "" Then
    CHIUSI = CHIUSI + 1
    End If
    End If

    Next CEL
    .......

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

    Re: Count lnes after filetr (2000 sr -1)

    You haven't included the code in the workbook.

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

    Re: Count lnes after filetr (2000 sr -1)

    Sorry

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

    Re: Count lnes after filetr (2000 sr -1)

    That is the code for a userform that is not present in the workbook.

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

    Re: Count lnes after filetr (2000 sr -1)

    form...

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

    Re: Count lnes after filetr (2000 sr -1)

    The code refers to a worksheet "GRUPPO" that is not present. This won't do, Sal. I don't want to keep on asking for each part in turn. Please post a usable workbook.

Posting Permissions

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