KB-31507: Creating Functions in E3 scripts.



How can I create a Function in an E3 script?


A simple example of how to do it would be:

Sub CommandButton1_Click()
   MsgBox Function()
End Sub

Function Function()
   Function = 5 * 10
End Function
Sub Temp()
End Sub

Please notice that you will not be able to edit the lines with Sub and End Sub in E3 scripts. Therefore, you will need to add an End Sub to be able to declare the Function, and then a Sub so that End Sub is not dangling in the script and causing errors.

Este artigo foi útil? Was this post helpful?

Leave a Reply

Your email address will not be published.Required fields are marked *