View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Arrays in macros

Gary,

They only need to be public if used across modules. If used in separate
macros in the same module, private is fine (preferable?).

--
HTH

Bob Phillips

"Gary''s Student" wrote in message
...
The arrays need to be public and static. Just DIM them outside the subs,

not
inside the subs and the values will "live" from sub call to sub call

Have a good day
--
Gary''s Student


"Bradley" wrote:

Within a sub procedure two other sub procedures are called

consecutively.
The first sub procedure feeds values into an array.
I need this array with these values to then be used in the second sub
procedure.

As soon as the first sub procedure is complete the array becomes empty

and
passes an empty array to the second sub procedure.
Thus givign me zero for all my calculations in the second array.

Please assist.