excel VBA快速取消工作簿中各工作表的自动筛选
时间:2022-11-17 12:13:02
当工作簿中的工作表数量较多时,要快速取消各个工作表中的自动筛选可以下面的VBA代码。
1.按Alt+F11,打开VBA编辑器。
2.在代码窗口中输入下列代码
Sub RemoveAllAutoFilter()
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
If sht.AutoFilterMode = True Then sht.AutoFilterMode = False
Next
End Sub
3.关闭VBA编辑器,按快捷键Alt+F8,打开“宏”对话框,选择包含“RemoveAllAutoFilter”的宏名,并单击“执行”按钮。
标签:代码,工作,筛选,编辑器,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
在WPS表格中如何设置下拉菜单呢?
2022-03-28 05:51:50
![](https://img.aspxhome.com/file/2023/0/a166700_0s.jpg)
Win10系统如何关闭自动定位功能?
2022-07-20 17:49:12
![](https://img.aspxhome.com/file/2023/26/a225722_0s.jpg)
Wps怎么设置禁止软件自动更新?
2023-04-05 07:42:53
![](https://img.aspxhome.com/file/2023/1/a166721_0s.jpg)
win11自动修复无法修复你的电脑srttrail.txt怎么办?
2022-12-23 16:26:48
![](https://img.aspxhome.com/file/2023/30/a265493_0s.jpg)
Excel中求和函数的操作方法
2022-09-15 12:42:22
如何利用注册表删除Win7家庭组图标
2022-11-04 04:13:18
![](https://img.aspxhome.com/file/2023/27/a233507_0s.jpg)
如何在Page文稿中使用文字环绕效果?
2023-04-16 00:49:20
![](https://img.aspxhome.com/file/2023/6/a206086_0s.jpeg)
如何在腾讯文档添加水印?腾讯文档添加水印的方法
2023-08-11 05:34:15
![](https://img.aspxhome.com/file/2023/7/a329838_0s.jpg)
excel表格如何使用PRODUCT函数
2023-11-22 06:56:36
Win11快捷键大全 Win11所有快捷键介绍
2023-09-24 03:41:49
![](https://img.aspxhome.com/file/2023/1/a283785_0s.png)
Win10 C盘空间满了怎么办?电脑c盘满了怎么释放空间?
2022-10-21 00:41:11
![](https://img.aspxhome.com/file/2023/25/a217954_0s.png)
精选推荐|macOS上隐藏的小技巧~
2023-05-20 03:46:45
![](https://img.aspxhome.com/file/2023/3/a209563_0s.gif)
Win10专业版笔记本电脑怎么关闭fn热键
2022-11-24 05:48:25
![](https://img.aspxhome.com/file/2023/26/a223630_0s.png)
Mac系统维护清理工具Maintenance for Mac常见问题解答
2022-10-07 09:24:42
![](https://img.aspxhome.com/file/2023/5/a213065_0s.png)
Win10 Mobile/PC版中邮件和日历更新 新增周视图/暗黑主题增强
2023-12-13 16:53:43
![](https://img.aspxhome.com/file/2023/28/a246645_0s.jpg)
excel表格设置变大的方法
2022-09-21 21:07:42
微信深色模式不喜欢?用 iOS 自带功能添加开关
2023-11-15 12:56:21
![](https://img.aspxhome.com/file/2023/8/a195498_0s.png)
百度云管家如何扩大容量?百度云管家扩大容量的方法
2023-11-25 00:11:38
![](https://img.aspxhome.com/file/2023/8/a337653_0s.jpg)
如何使用U盘重装Win11?U盘重装Win11方法教程
2022-12-23 04:44:15
![](https://img.aspxhome.com/file/2023/27/a234909_0s.png)
win7系统不能格式化D盘的解决方案
2023-11-22 04:57:37
![](https://img.aspxhome.com/file/2023/27/a233012_0s.jpg)