KB-31507: Creating Functions in E3 scripts.

Question:

 

How can I create a Function in an E3 script?

Solution:

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.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 5 / 5. Count: 1

Leave a Reply

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