"al" <gr*********@yahoo.com> wrote in message
news:66**************************@posting.google.c om...
.. . .
How can I make a variable declared in a function to be global.
Can't be done, for two reasons.
1. Variables declared in a function are local (or possibly Static),
/never/ any more than that. If you want a variable with wider
scope, follow the language rules and declare it elsewhere.
2. "Global" variables can /only/ be declared in Modules, not Classes
(remember Forms /are/ Classes).
To make the variable accessible throughout a Class, make it an
instance variable of the Class, as in
Class abc123
Private siText as String = ""
' This variable can be seen anywhere in /this/ class
' but /not/ outside it
. . .
End Class
HTH,
Phill W.