View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default send sub routine variable to global

Hi
Declare the variable outside the sub at the top of the module, but
define it as you did inside the sub.
Then
Dim myVariable
at the top of the sub can be used inside that module.
Also
Public myVariable
at the top of the sub can be used inside the project

regards
Paul

Nigel wrote:

so in a subroutine, i set a variable in the middle of script, and
aftewards, i wanted to use that variable globally....can i take a
variable and set a global variable with it from inside a subroutine?