Thread: Arrays
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Arrays

Or you could pass it as a variant argument e.g.

Sub Proc1()
Proc2 Array("Hello")
End Sub

Sub Proc2(ByVal ArgArray As Variant)
MsgBox ArgArray(0)
End Sub


"Chip Pearson" wrote in message ...
Torbjorn,

Declare the array as a public variable, prior to and outside of any
procedure in the module.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Torbjörn Steijer" wrote in message
...
Hi,

I have an array created in one procedure that I would like to use in

another
procedure. How can I make the array in first procedure available in other
procedures?

TIA

Torbjorn