sandhyaramesh
9 years agoNew Contributor
Global Variable Issue : Unable to access parameter value across script units
Hi,
I am not able to access variable value across script units.
In below code we have 2 function in 2 different units and have declared as global variable and useunit, but still we are not able to get parameter value when the control passes to T() function in another unit and we are getting error "Type mismatch: 'Parameter'".
/////Script Unit1
'USEUNIT Unit2
Dim Parameter, Increment
Function Test
Increment = ""
For k = 1 to 5
Increment = Increment & k & ";"
Next
Parameter = Split(Increment,";")
Unit2.T()
End Function
////Script Unit2
Dim Parameter
Function T()
log.message Parameter(2)
log.message Parameter(3)
End Function
Regards
Sandhya