View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ExcelMonkey[_190_] ExcelMonkey[_190_] is offline
external usenet poster
 
Posts: 172
Default Array Empty After Sub Called

I have a public 1D array.

Public Array1 as Variant

I have loaded it with text strings.

Array1(0) = "Comment"
Array1(1) = "Range"
etc

After loading it, I Debug.Print Array(0) etc and it shows
that the array has text strings in it. I can also search
the array with an application.Index function and return
the strings.

However right after I call a new sub, the array is
empty. This is odd as it was declared as public and I
have other arrays in the same sub with integers which
make their way to the sub that his one is failing in.

Anybody know why this would happen?

Thanks