Hi, I am trying to pass the value of a variable from one script to other but it doesn't work, I have declared the variable as public on the passing script but no luck, please help!!
The program is TestPartner
Put the variable in a shared module
and drive the two scripts from a
I do the following for my scripts. Define these in a shared module (for my database):
Private DataBaseToRestore As String
' Database path info
Public Sub SetDataBasePath(str As String)
DataBaseToRestore = str
Public Function GetDataBasePath() As String
GetDataBasePath = DataBaseToRestore
To set the database anywhere in the project call SetDataBasePath "whatever"
To retrieve the path anywhere in the project call GetDataBasePath.
That's if I want to be able to set the variable during runtime. If I just want a variable set once I use String Map, type cast if I want an int from a string.
If the scripts are both being executed by a driver script, you can create a local variable in one script, pass it out as a global variable, then import the variable into the other script
"I think when you spread the wealth around, it's good for everybody." -- Toledo, Ohio, Oct. 12, 2008
Thanks a lot, it works
Normally passing variables between scripts is the job of your framework - why would you want to pass variables?