Forum Discussion
HKosova
13 years agoSmartBear Alumni (Retired)
Hi Praveen,
To access the Va variable defined in the Te2 unit using the Te2.Va syntax, you need to define this variable outside of any routines, so that it has the global scope (rather than the local scope to the pro routine):
Alternatively, you can create the Va variable as a project variable (in Tools > Current Project Properties > Variables); in this case, you can use this variable like this:
Unit Te2:
Unit Te3:
To access the Va variable defined in the Te2 unit using the Te2.Va syntax, you need to define this variable outside of any routines, so that it has the global scope (rather than the local scope to the pro routine):
Dim Va
Sub pro
Va = 10
End Sub
Alternatively, you can create the Va variable as a project variable (in Tools > Current Project Properties > Variables); in this case, you can use this variable like this:
Unit Te2:
'USEUNIT Te3
Sub pro
Project.Variables.Va = 10
End Sub
Unit Te3:
'USEUNIT Te2
Function Te3
Te2.pro
Log.Message Project.Variables.Va
End Function
Related Content
- 5 years ago
- 3 years ago
Recent Discussions
- 9 hours ago