+ Reply to Thread
Results 1 to 3 of 3

Macro - Autofilter Change. [minor problem]

  1. #1
    Forum Contributor
    Join Date
    05-05-2006
    Posts
    143

    Macro - Autofilter Change. [minor problem]

    '
    ' Thursdays Macro
    ' Macro recorded 31/10/06 by Sam Prince
    '

    '
    Sheets("PeakCounts").Select
    Selection.AutoFilter Field:=2, Criteria1:="Thursday"
    Sheets("Peak - Counts").Select
    End Sub

    ^^ I'm using the above Macro to Change an Auto Filter on another Worksheet so that the charts on "Peak - Counts" reflect singular days. In the above example Thursdays.

    These Macros work fine, however is causes the "PeakCounts" worksheet to flash up before changing back to "Peak - Counts"

    Is it possible to alter this code in some way so that the flash between worksheets is not visible?

    TY
    SP.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by samprince
    '
    ' Sheets("PeakCounts").Select
    Selection.AutoFilter Field:=2, Criteria1:="Thursday"
    Sheets("Peak - Counts").Select
    End Sub

    ^^ I'm using the above Macro to Change an Auto Filter on another Worksheet so that the charts on "Peak - Counts" reflect singular days. In the above example Thursdays.

    These Macros work fine, however is causes the "PeakCounts" worksheet to flash up before changing back to "Peak - Counts"

    Is it possible to alter this code in some way so that the flash between worksheets is not visible?
    TY
    SP.
    You could try

    Application.ScreenUpdating = False

    at the start, then

    Application.ScreenUpdating = True

    at the end, that should help hide that you 'Select' the two sheets.

    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Contributor
    Join Date
    05-05-2006
    Posts
    143
    Works a treat.

    Many thanks.

    SP.

+ 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