Thread: ReDim Matrix
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default ReDim Matrix

Hi Arne,

Is it possible to ReDim a matrix? I am trying to do just that but I get the
error message that Matrix dimension already set. Please need help!


Yes, but to be able to do that you need to change your declaration to:

Dim MyMatrix() as Variant/Long/String/Double/.....

(i.e. omit the size info between the brackets).

Check Help on the ReDim statement. It reads somewhe

Remarks

The ReDim statement is used to size or resize a dynamic array that has already
been formally declared using a Private, Public, or Dim statement with empty
parentheses (without dimension subscripts).



Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com