+ Reply to Thread
Results 1 to 4 of 4

Automatic advanced filter when document opens

  1. #1
    Registered User
    Join Date
    01-29-2009
    Location
    USA
    MS-Off Ver
    Excel 2002
    Posts
    10

    Automatic advanced filter when document opens

    Hi, I have an advanced filter that works perfectly, but is there any way to have it use this filter automatically when the document opens, instead of having to go to DATA -> FILTER -> ADVANCED FILTER-> OK every time I open it? I know it s just a little extra effort but I'm trying to impress my boss, thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Automatic advanced filter when document opens

    Place the code in ThisWorkbook module.

    Record code the actions and change as required. e.g

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-24-2009
    Location
    Seattle, Washington
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Re: Automatic advanced filter when document opens

    I have an added layer to this question....

    I currently have the above code in place to automatically apply an advanced filter when I click a form control button in my worksheet. However, I am running into some problems because I can only apply the code to the first row within my criteria range (i.e. it applies the AND criteria across the first row but not OR criteria down a column).

    I have multiple qualifiers or criteria that each have a different number of options (ex: Criteria = Business Type, Options = B2B, B2C, or Hybrid, etc.) ---
    What I think the code needs to do is determine which row within the criteria range has the last text entry and then filter from that row and above. I cannot simply select the entire range in the macro because any completely blank rows tell the filter to pull the entire data set.

    Has anyone encountered this before?

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Automatic advanced filter when document opens

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

+ 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