Global variable problem

gjoisa

Active Member
Licensed User
Longtime User
I had declared some variables in Process_globals . But when I tried to use them in my second Activity , Compiler states that variable was not declared . How to declare the variables , they can be used in all Activities ?
 

klaus

Expert
Licensed User
Longtime User
Did you add the prefix Main to the variables in the other activity?

Sub Process_Globals
Dim Var AsDouble

In the other activity.
Main.Var = 1.23

It's the same as with the Modules in B4PPC.

You can also declare process global variables in other activities, then you must add the activity name as the prefix for the variables in other activities.

Best regards.
 
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
Thank you . Like so is it possible to write sub that can be accessed in all activities ?:sign0085:
 
Upvote 0
Top