cool hit counter VBA functions and procedures concise tutorial_Intefrankly

VBA functions and procedures concise tutorial


' VBA functions and procedures concise tutorial

Sub process name() 'Sub process of representation, You can see it in the execution macro or in the graphical right-click on the specified macro, Cannot return a value

Call  Function Name(Array(1, 2), b) ' Call the procedure and put the return value into ther

End Sub ' Closing process

Function Function Name(a, Optional ByVal b) 'Function denote a function, It is also possible to use in a cell, Macro list not visible, Can make macro lists concise 'VBA defaultByRef will change the value of the original parameter, So addByVal

If IsMissing(b) Then b = 1
'Optional Indicates that parameters can be optionally omitted, The above statement sets the value if there is no, Common settings are available for flexible debugging, If there is a non-optional you can't run it directly

ReDim arr(UBound(a)) ' Defining variable arrays,UBound() is to find the maximum subscript value

arr(1) = b

 Function Name = arr ' return value, merelyFunction available

Exit Function ' exit function, Don't usereturn,return is to return in a program toGoSub later line

End Function ' end function


Recommended>>
1、Trends are king
2、The cheat hangers of Da Tang gold flower open hang Dont worry about losing with the Datang gold fryer seethrough
3、Face recognition is from see clearly to see understand artificial intelligence to accelerate into the application scene
4、Fault Tolerance Protection for Microservices
5、Kotlin series of main constructor methods and initialization statement blocks

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号