【VBA】标准Sub/Function定义,带ScreenUpdating、On Error GoTo
【说明】
标准Sub/Function定义,带ScreenUpdating、On Error GoTo
Sub AutoFillRole()
'--------------- ERROR MSG------------------------------
On Error GoTo errorhandle:
'On Error Resume Next
'--------------- ERROR MSG------------------------------
Application.ScreenUpdating = False Application.ScreenUpdating = ture '--------------- ERROR MSG------------------------------
Exit Sub
errorhandle:
If Err.Number > Then
MsgBox Err.Description & " " & Err.Number
End If
'--------------- ERROR MSG------------------------------
End Sub
Function FindRole(key As String) As String
'--------------- ERROR MSG------------------------------
On Error GoTo errorhandle:
'On Error Resume Next
'--------------- ERROR MSG------------------------------
Application.ScreenUpdating = False Application.ScreenUpdating = ture
'--------------- ERROR MSG------------------------------
Exit Function
errorhandle:
If Err.Number > Then
MsgBox Err.Description & " " & Err.Number
End If
'--------------- ERROR MSG------------------------------
End Function
【VBA】标准Sub/Function定义,带ScreenUpdating、On Error GoTo的更多相关文章
- C++ Pirmer : 第十四章 : 重载运算符与类型转换之函数调用运算符与标准库的定义的函数对象
函数调用运算符 struct test { int operator()(int val) const { return (i > 0 ? i : -i); } }; 所谓的函数调用就是一个类重 ...
- CREATE FUNCTION - 定义一个新函数
SYNOPSIS CREATE [ OR REPLACE ] FUNCTION name ( [ argtype [, ...] ] ) RETURNS rettype { LANGUAGE lang ...
- js function定义函数的4种方法
js function定义函数的4种方法 1.最基本的作为一个本本分分的函数声明使用. 复制代码代码如下: 复制代码代码如下: function func(){} 或 var func=functio ...
- c/c++ 重载运算符 标准库function的用法
重载运算符 标准库function的用法 问题:int(int, int)算不算一种比较通用的类型?? 比如函数: int add(int a, int b); 比如lambda:auto mod = ...
- 标准JSON格式定义与解析注意点
标准JSON格式定义与解析注意点 在JS.IOS.Android中都内置了JSON的序列化.反序列化SDK.JEE中也可以使用第三方的JSON解析库,如GSON.虽然在JSON格式被定义出来的时候并没 ...
- [Android]自己定义带删除输入框
在项目开发中,带删除button输入框也是人们经常常使用到的,该文章便介绍一下怎样创建一个带删除输入框.当中,须要解决的问题例如以下: a)创建自己定义editText类 b)在自己定义editTex ...
- ANSI 标准C 还定义了如下几个宏
ANSI 标准C 还定义了如下几个宏:_LINE_ 表示正在编译的文件的行号_FILE_ 表示正在编译的文件的名字预处理名称意义#define 宏定义#undef 撤销已定义过的宏名#include ...
- stm32存储器映像和标准库中定义外设地址的方法
结合存储器映像理解stm32标准库中定义外设地址的方法. stm32f103zet6是32位的.它所能访问的地址空间范围为2^32=4GB,把4GB分为8个block,分别为block0-block- ...
- js中使用function定义类、实例化,函数的调用方法
function Test002(name, age){ name, age, this.printInfo = function(){ //定义的公有方法 console.log(name, age ...
随机推荐
- ASP.NET各种技巧
1.动态添加文件框 前台页面关键部分: <script type="text/javascript"> //添加一个选项 function AddFileCtrol() ...
- 题解 P2626 【斐波那契数列(升级版)】
这道题,大家一定要注意: 要对2^31取模 ! ( 本蒟蒻开始没注意到这一点,WA了 ) (不过大家在试样例的时候,试试47,出不了结果,就说明你没模2^31) 总体来说,这道题考查的知识点就两个: ...
- 什么是SAD,SAE,SATD,SSD,SSE,MAD,MAE,MSD,MSE?
SAD(Sum of Absolute Difference)=SAE(Sum of Absolute Error)即绝对误差和 SATD(Sum of Absolute Transformed Di ...
- SpringBoot学习1:创建第一个SpringBoot项目
一.新建项目 二.打开项目的pom文件,在里面添加maven依赖 <!--springboot项目依赖的父项目--> <parent> <groupId>org.s ...
- oc字典
#import <Foundation/Foundation.h> int main(int argc, const char * argv[]) { @autoreleasepool { ...
- NodeJS--exports和module.exports
继续迁移印象笔记中记录相关笔记,其实工作中遇到的很多问题当时解决了,后期就忘记了,多记录还是很有用的,好记性不如烂笔头嘛,以后要养成好习惯. NodeJS中 require 用来加载代码,而 expo ...
- A1020 Tree Traversals (25 分)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and i ...
- 如何禁止用户连续点击一个按钮事件详细JS
<input type="button" id="submit" value="提交"> <script> $(do ...
- python中生成器对象和return 还有循环的区别
python中生成器对象和return 还有循环的区别 在python中存在这么一个关键字yield,这个关键字在项目中经常被用到,比如我写一个函数不想它只返回一次就结束那我们就不能用return,因 ...
- [译]The Python Tutorial#10. Brief Tour of the Standard Library
[译]The Python Tutorial#Brief Tour of the Standard Library 10.1 Operating System Interface os模块为与操作系统 ...