+ Reply to Thread
Results 1 to 5 of 5

Help. On Workbook open refresh autofilter

  1. #1
    Registered User
    Join Date
    09-08-2017
    Location
    Houston, Texas
    MS-Off Ver
    2010, 2016
    Posts
    34

    Help. On Workbook open refresh autofilter

    I'm trying to have VBA do an auto-filter refresh whenever I open my workbook file. I'm encountering an error whenever it opens up though. Any ideas?

    Edit: I just want it to refresh the entire auto-filter table which is from columns A to G with rows 4 to 300 (for now)
    debug_help.png
    Last edited by huyza_0100; 09-15-2017 at 05:24 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Help. On Workbook open refresh autofilter

    try

    With WSFound2
    .AutoFilterMode = False
    . Range("A1:G1").AutoFilter
    . Range("A1:G1").AutoFilter Field:=1 Criteria1:="<>"
    End With

  3. #3
    Registered User
    Join Date
    09-08-2017
    Location
    Houston, Texas
    MS-Off Ver
    2010, 2016
    Posts
    34

    Re: Help. On Workbook open refresh autofilter

    This gave me a syntax error with . Range("A1:G1").AutoFilter Field:=1 Criteria1:="<>" highlighted in red

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Help. On Workbook open refresh autofilter

    Sorry, I forgot the comma between Field:=1, Criteria1="<>"

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-08-2017
    Location
    Houston, Texas
    MS-Off Ver
    2010, 2016
    Posts
    34

    Re: Help. On Workbook open refresh autofilter

    Thanks!! Definitely helped!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Refresh all queries on workbook open, when finished print to pdf then close workbook
    By Bree Harvey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2014, 04:53 AM
  2. Replies: 0
    Last Post: 05-27-2013, 05:28 AM
  3. Replies: 1
    Last Post: 03-18-2013, 11:09 PM
  4. Excel 2007 : Refresh Autofilter
    By nasfric in forum Excel General
    Replies: 1
    Last Post: 08-22-2011, 07:14 PM
  5. Workbook Open after automatic refresh
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2009, 02:22 PM
  6. Refresh Autofilter
    By kellyfspringer in forum Excel General
    Replies: 5
    Last Post: 07-12-2009, 07:08 PM
  7. Autofilter Refresh Code
    By RhyGuy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2009, 05:01 PM

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