+ Reply to Thread
Results 1 to 2 of 2

Problem with range and autofilter

  1. #1
    Registered User
    Join Date
    03-30-2004
    Posts
    31

    Problem with range and autofilter

    Private Sub CommandButton1_Click()

    ActiveWorkbook.RefreshAll

    With Worksheets("Findings")
    .DisplayPageBreaks = False
    Worksheets("EstFindings").Range("a1:b1").AutoFilter _
    Field:=2, _
    Criteria1:=">=0.01"
    .DisplayPageBreaks = True
    End With

    End Sub
    Excel 2002

    This macro is running off of a button on Worksheet1. What I'm trying to do is refresh my PivotTablesthen place an custom AutoFilter on columns A and B of my worksheet named "findings" that sorts by items greater than 0%.

    When I run the macro, I get an error stating the Range selection method failed.

    Thoughts?

  2. #2
    Kassie
    Guest

    RE: Problem with range and autofilter

    Hi

    Instead of A1:B1, try A:B

    "BigDave" wrote:

    >
    > >
    > > Private Sub CommandButton1_Click()
    > >
    > > ActiveWorkbook.RefreshAll
    > >
    > > With Worksheets("Findings")
    > > .DisplayPageBreaks = False
    > > Worksheets("EstFindings").Range("a1:b1").AutoFilter _
    > > Field:=2, _
    > > Criteria1:=">=0.01"
    > > .DisplayPageBreaks = True
    > > End With
    > >
    > > End Sub
    > >

    >
    > Excel 2002
    >
    > This macro is running off of a button on Worksheet1. What I'm trying
    > to do is refresh my PivotTables*then* place an custom AutoFilter on
    > columns A and B of my worksheet named "findings" that sorts by items
    > greater than 0%.
    >
    > When I run the macro, I get an error stating the Range selection method
    > failed.
    >
    > Thoughts?
    >
    >
    > --
    > BigDave
    > ------------------------------------------------------------------------
    > BigDave's Profile: http://www.excelforum.com/member.php...fo&userid=7741
    > View this thread: http://www.excelforum.com/showthread...hreadid=387751
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1