diff --git a/vba_code_common.bas b/vba_code_common.bas index 23a1085..39ef58d 100644 --- a/vba_code_common.bas +++ b/vba_code_common.bas @@ -175,11 +175,10 @@ Sub ToggleAutoFilter(Optional ByVal filterRow As Long = 6) ' Check if auto filter is already on If ws.AutoFilterMode Then - ' Turn off auto filter ws.AutoFilterMode = False Else - ' Turn on auto filter at row 6 If filterRow >= 1 Then + ws.Range(ws.Cells(filterRow, 1), ws.Cells(filterRow, 20)).Select ws.Range("A" & filterRow).AutoFilter End If End If