Using variables between subs

Posted by Artel on Sun 03 Apr 2005 06:38 AM — 2 posts, 16,235 views.

USA #0
How do I use the values from a variable in one sub in another sub?
USA #1
Make it a global variable (dim it in the script file, not in a sub):

Dim A

Sub asdf (sName,sLine, aryWild)
'do something
A = 3
End Sub

Sub hjkl (sName,sLine, aryWild)
'do something else
A = A + 1
'A now equals four (provided you run asdf before hjkl)
End Sub