View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How to code ReDim Preserve when "ReDim strArr(1 To 100, 1 To 3)"

You can only redim the 2nd dimension

Dim strArr() As String
Dim iCtr as Long

ReDim strArr(1 To 3, 1 To 100)
......
......

Getting an error if I code:
ReDim Preserve strArr(1 to 3,1 To iCtr)


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
...
Dim strArr() As String
Dim iCtr as Long

ReDim strArr(1 To 100, 1 To 3)
......
......

Getting an error if I code:
ReDim Preserve strArr(1 To iCtr).elements(1 to 3)

Any thoughts appreciated!

EagleOne