Hallo ich würde gerne folgendes tun,
Initilize
Dim varList(0,1) As Variant
Function addType
intDimension = Ubound(varList,1)
intNewDimension = intDimension + 1
Redim Preserve varList(intDimension,1)
Er sagt mir aber ,dass ich ein fixex Array nicht redimensionieren kann. :-:
Auch das steht in der Hilfe:
Example 2
Option Base 1
' Declare a two-dimensional dynamic array, of Variant type.
ReDim markMar(2, 2)
' Assign a value to each element.
markMar(1, 1) = 1
markMar(2, 1) = 2
markMar(1, 2) = 3
markMar(2, 2) = 4
' Change the upper bound of the last dimension of markMar
' from 2 to 3, preserving the values already stored in
' existing elements of markMar.
ReDim Preserve markMar(2,3)
' Assign values to the additional elements of markMar.
markMar(1, 3) = 5
markMar(2, 3) = 6
Hubert
Stimmt:
If Preserve is specified, you can change only the upper bound of the last array dimension. Attempting to change any other bound results in an error.
Aber was ist die erste, was ist die zweite Dimension? Ist das nicht eher eine Sache dir nur im Kopf passiert?
Hubert