Consulting

Results 1 to 2 of 2

Thread: Sleeper: Autofilter Problem

  1. #1

    Sleeper: Autofilter Problem

    Hi, I use the following VBA codes in 2 Excel files (There are in same structure, just different data), one works smoothly, but the other one has error message (saying the autofilter in class range is wrong?). I'm quite confuesd as I didn't change anything...

    With oWs
    For I= .Cells(.Rows.Count, "A").End(xlUp).Row To 2 Step -1
    If .Range("C" & I).Value <> "" Then
    If .Range("H" & lRw).Value = "" Then .Range("I" & lRw).Value = "N"
    End If
    Next lRw
    .Range("A1:I" & .Cells(.Rows.Count, "A").End(xlUp).Row).AutoFilter Field:=9, Criteria1:="<>N"
    End With

  2. #2
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Hi there,

    Please post all code. And if need be, zip/attach both Excel files.

Posting Permissions

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