Translate

Mittwoch, 9. August 2017

Excel VBA Refresh column filters.

Sub Button_RefreshFilter()
    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

Keine Kommentare:

Kommentar veröffentlichen