Excel如何定制模块行为的VBA语句
时间:2022-02-01 10:01:00
(1) Option Explicit 强制对模块内所有变量进行声明。
Option Compare Text 字符串不区分大小写。
Option Base 1 指定数组的第一个下标为1。
(2) On Error Resume Next 忽略错误继续执行VBA代码,避免出现错误消息。
(3) On Error GoTo ErrorHandler 当错误发生时跳转到过程中的某个位置。
(4) On Error GoTo 0 恢复正常的错误提示。
(5) Application.DisplayAlerts=False 在程序执行过程中使出现的警告框不显示。
(6) Application.ScreenUpdating=False 关闭屏幕刷新。
Application.ScreenUpdating=True 打开屏幕刷新。
(7) Application.Enable.CancelKey=xlDisabled 禁用。
Ctrl+Break 中止宏运行的功能。
标签:变量,模块,语句,过程中,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win10电脑怎么启用内置的虚拟机?
2023-12-12 22:19:12
![](https://img.aspxhome.com/file/2023/3/51453_0s.jpg)
win10系统如何进入安全模式修复系统文件?
2023-08-21 14:08:35
![](https://img.aspxhome.com/file/2023/2/46902_0s.jpg)
Win10中Word打不出中文怎么办?
2023-11-24 04:29:27
![](https://img.aspxhome.com/file/2023/1/50881_0s.jpg)
在Excel中调整编辑栏高度的三种方法
2023-10-13 18:44:13
word2007文档怎么将单页转成横版
2023-03-20 16:22:39
Excel表格怎样创建加号展开按钮
2022-12-14 20:46:05
excel怎么添加索引? excel工作表做索引的教程
2022-09-14 20:18:11
![](https://img.aspxhome.com/file/2023/8/41338_0s.jpg)
Excel怎么制作目录导航超链接
2023-07-16 00:52:22
![](https://img.aspxhome.com/file/2023/2/35972_0s.jpg)
excel表格批注不显示的解决教程
2022-10-06 11:00:49
或使用箭头键移动到所要添加的区域的起始处
2022-05-04 04:14:49
PPT演示文稿内容转成Word文档
2023-12-12 01:30:12
![](https://img.aspxhome.com/file/2023/8/20608_0s.jpg)
使用Excel函数实现分填数字金额的方法
2023-02-09 08:59:39
excel表格中怎么制作泡泡统计图表?
2023-07-01 18:11:49
![](https://img.aspxhome.com/file/2023/0/40740_0s.jpg)
Excel表格设计不等宽柱的图表有什么方法
2022-12-27 00:59:59
excel 表格怎么添加分割线斜杆?
2023-04-26 03:10:15
![](https://img.aspxhome.com/file/2023/5/a155365_0s.jpg)
在Excel中怎么从一个文本的第一个字符开始截取指定数目的字符?
2022-08-13 14:55:23
![](https://img.aspxhome.com/file/2023/9/42299_0s.jpg)
Word2013文档中设置段落缩进的三种方法
2023-12-11 16:24:17
![](https://img.aspxhome.com/file/2023/3/20903_0s.jpg)
如何设置 excel 图表的局部数据标记点实例教程
2022-05-02 22:48:51
![](https://img.aspxhome.com/file/2023/6/a155356_0s.jpg)
excel表格如何加密
2022-10-17 02:17:59
word2010如何插入SmartArt图形
2023-12-06 15:11:12
![](https://img.aspxhome.com/file/2023/6/19366_0s.png)