+ Reply to Thread
Results 1 to 3 of 3

Filter Problem

  1. #1
    Coal Miner
    Guest

    Filter Problem

    My filter is not returning any data. Here is the applicable portion of the
    code:

    Sub WorkOrdersCompletedByDate()
    Prompt = "Please Enter Beginning Date (mm/dd/yy). Hitting 'Cancel' Will
    End the Macro."
    Title = "Print Completed Work Orders for a Specific Date Range"
    newname1 = InputBox(Prompt, Title, "mm/dd/yy")
    Prompt = "Please Enter Ending Date (mm/dd/yy). Hitting 'Cancel' Will
    End the Macro."
    Title = "Print Completed Work Orders for a Specific Date Range"
    newname2 = InputBox(Prompt, Title, "mm/dd/yy")
    Selection.AutoFilter Field:=12, Criteria1:=">=Newname1", Operator:=xlAnd _
    , Criteria2:="<=newname2"
    End Sub

    Is there a # format issue here???? Someone please help!!!! THANK YOU!!!

  2. #2

    Re: Filter Problem

    Your quotation marks are wrong - your criteria returns the literal
    >=NewName1 rather than the compound you want


    try

    criteria1:=">=" & newname1

    NOTE you may still need to format newname1 (though hopefully not!)


  3. #3
    Coal Miner
    Guest

    Re: Filter Problem

    Thank you so much!! Works great now!

    "[email protected]" wrote:

    > Your quotation marks are wrong - your criteria returns the literal
    > >=NewName1 rather than the compound you want

    >
    > try
    >
    > criteria1:=">=" & newname1
    >
    > NOTE you may still need to format newname1 (though hopefully not!)
    >
    >


+ 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