似乎旧的宏无法正常工作。我已经设置了适当的安全性来运行VBA宏,但是当我尝试了几种清除工作表上所有筛选器的方法时,出现编译错误。
这是我尝试过的:
Sub AutoFilter_Remove()
'This macro removes any filtering in order to display all of the data but it does not remove the filter arrows
ActiveSheet.ShowAllData
End Sub
我在工作表上有按钮可以清除所有过滤器,以方便用户使用,因为工作表上有很多带有过滤器的列。
如果工作表上已经有过滤器,则:
Sub Macro1()
Cells.AutoFilter
End Sub
将其删除。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句