excel vba 取消篩選

Step 1 在功能列「開發人員」中程式碼選擇「Visual Basic」

Step 2 複製下方程式碼貼上,並按下執行即可
Sub ClearFilter()
' 取消篩選
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
End If
End Sub
【教學】Excel VBA 如何取消工作表欄位篩選?超簡單馬上搞定!
A blog of my life
excel vba 取消篩選
Step 1 在功能列「開發人員」中程式碼選擇「Visual Basic」
Step 2 複製下方程式碼貼上,並按下執行即可
Sub ClearFilter()
' 取消篩選
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
End If
End Sub