Consulting

Results 1 to 2 of 2

Thread: Sleeper: Advance Filter with command button

  1. #1
    VBAX Contributor
    Joined
    May 2007
    Posts
    128
    Location

    Sleeper: Advance Filter with command button

    Dear Experts

    On worksheet, Find button Display many of records instead given criteria in A1

    Please reveiw attachment and help

  2. #2
    Here is the changed snippet

     
    ' With shData.Columns("A:H").Rows("2:9999")
    With shData.Columns("A:A").Rows("2:9999") 'Changed By Shasur
        Set mycell = .Find(stringToLookFor, LookIn:=xlValues)
        If Not mycell Is Nothing Then
            firstAddress = mycell.Address
            Do
    'if mycell = stringtolookfor then
                    myFoundRow = mycell.Row
                    shData.Range("a" & myFoundRow & ":H" & myFoundRow).Copy _
                        Destination:=sh.Cells(myrow, 1)
                    myrow = myrow + 1
    'Set mycell = shData.Columns("A:H").FindNext(mycell)
                Set mycell = shData.Columns("A:H").FindNext(mycell) 'Changed By Shasur
            Loop While Not mycell Is Nothing _
                And mycell.Address <> firstAddress
    Else
             MsgBox ("Nothing Found")
          End If
       End With

Posting Permissions

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