View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default 2D array of strings problem

I have the following erroneous subroutine:

'=================================
Sub DoStuff (A as Integer, B as Integer)

Dim (A, B) as String ' This creates an error!

End Sub
'================================

Is it possible to create a 2D array whose size depends
on the values of A and B above? I'm basically
looking for a way to create a 2D array whose
dimensions are not known at runtime. The size
of this 2D array will stay constant for the duration
of the "DoStuff" procedure, so I only need to set
it's size once.

Any ideas?

- Robert