View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Matt S Matt S is offline
external usenet poster
 
Posts: 112
Default Losing my array from one sub to another


"JLGWhiz" wrote:

Your public Dim does not match your ReDim variable names.


JLG, I have these specified above:

Dim arrSelectedFiles() As String
Dim arrSelectedSpecies() As String
Dim arrSelectedLayers() As String


Then in the second Sub routine, I have these below, which I refer to later
in the first sub. THe problem is, after I return from the second, I no
longer have these arrays! I'm so frustrated!


ReDim Preserve arrSelectedFiles(1 To lngFileCount)
ReDim Preserve arrSelectedSpecies(1 To 10)
ReDim Preserve arrSelectedLayers(1 To 4)



Thanks,
Matt