zoukankan      html  css  js  c++  java
  • 【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 > 0 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 > 0 Then
            MsgBox Err.Description & " " & Err.Number
        End If
        '--------------- ERROR MSG------------------------------
    End Function
  • 相关阅读:
    做接口测试最重要的知识点
    HTTP和HTTPS区别
    UVA, 686 Goldbach's Conjecture (II)
    UVA, 543 Goldbach's Conjecture
    UVA, 580 Critical Mass
    UVA, 900 Brick Wall Patterns
    UVA, 11000 Bee
    UVA, 10079 Pizza Cutting
    C++ 向量<vector>的学习
    jenkins入门
  • 原文地址:https://www.cnblogs.com/dlsunf/p/9361401.html
Copyright © 2011-2022 走看看