cancel
Showing results for 
Search instead for 
Did you mean: 

Call a Global Variable from another Unit in Vb Script

Regular Contributor

Call a Global Variable from another Unit in Vb Script

How to call a Global Variable declared  in another Unit in VB script.

I used these link for help:

 

1)   https://support.smartbear.com/testcomplete/docs/scripting/calling-routines/declared-in-another-unit/...

 

but i could'nt understand ...please help

1 REPLY 1
Community Hero

Re: Call a Global Variable from another Unit in Vb Script

Say, you have Unit1 and Unit2

 

Let declare a variable A in Unit1:

 

[Unit1]

A = 1

 

Now to call A from Unit2:

 

[Unit2]

'USEUNIT Unit1

Function Test()
  Log.Message(Unit1.A)
End Function
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors