Results 1 to 3 of 3

Apply Macro to entire workbook

Threaded View

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Rochester NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Apply Macro to entire workbook

    I have a macro that re-filters the information in the column when I add new information in a different sheet. it works great but i have the code in all 28 sheets that does this and it really slows down my excel is there a way to make it into a macro that will apply to the entire workbook?

    Sub Refilter()    
        If Me.FilterMode = True Then
            With Application
                .EnableEvents = False
                .ScreenUpdating = False
            End With
             
            With ActiveWorkbook
                .CustomViews.Add ViewName:="Mine", RowColSettings:=True
                Me.AutoFilterMode = False
                .CustomViews("Mine").Show
                .CustomViews("Mine").Delete
            End With
             
             
            With Application
                .EnableEvents = True
                .ScreenUpdating = True
            End With
        End If
    End Sub
    Moderators Note: Please follow forum rules and use code tags. Added for you this time, but please use them in the future…Thanks.
    Last edited by jeffreybrown; 11-27-2012 at 03:06 PM.

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