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
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.