Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 09:37:48 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  User Defined Function
Pages: 1   Go Down
Print
Author Topic: User Defined Function  (Read 269 times)
0 Members and 2 Guests are viewing this topic.
10k
Active Member

Offline Offline

Posts: 3


View Profile
« on: December 23, 2011, 09:51:58 AM »

Is there a way to create user defined functions that are available globally?

In the screen designer, I have defined several buttons that execute VB code.  The functions are similar, but not identical.  I have a VB function that's defined in a large section of code.  I'd prefer not to include the code that defines the function in each of the calling buttons.  If I do, I have to keep editing every instance when I make a change.  What I'd like to do is:

     Button 1-10 - just a few lines of code that call function using different parameters.

     Large chunk of code defining function - located somewhere else.

I need to pass parameters to the function, and receive return parameters from the function.  The function needs to complete execution before returning control to the calling VB code.

Is there a way to do this?  I've searched the forum and so far it appears that you can't do this.

Thanks.

Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,619



View Profile WWW
« Reply #1 on: December 23, 2011, 10:08:25 AM »

See #Expand on page 108
http://www.machsupport.com/docs/Mach3_V3.x_Macro_Prog_Ref.pdf
Logged

Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!