Good day,
Is there a way to declare a 2-dimensional array, starting from 1 upto 1000 for each dimension and most importantly consisting of different data type?
What I know is:
This provides first array index 1 as opposed to 0 but it is one dimensional
This is a 2-D array but all dimensions of type integer, not of different type.
I want to declare an array one dimension of which is sth like the Type below:
And based on what I know above, I tried:
but this fails...
Why on earth I would want this: Because, I want to run a loop to assign values to textBox objects which form a UserForm. By array-like indexing it is easy to reach out controls within loop. If I used Type decleration I would have to manually type each different bit of the myType type.
Many thanks in advance
Is there a way to declare a 2-dimensional array, starting from 1 upto 1000 for each dimension and most importantly consisting of different data type?
What I know is:
Code:
Dim myArray(1 to 1000) As Integer
Code:
Dim myArray(1 to 1000, 1 to 1000) As integer
I want to declare an array one dimension of which is sth like the Type below:
Code:
Public Type myType
x As Integer
y As Integer
str As String
lng As Long
End Type
And based on what I know above, I tried:
Code:
Dim myArray(1 to 1000 As Integer, 1 to 1000 As myType)
Why on earth I would want this: Because, I want to run a loop to assign values to textBox objects which form a UserForm. By array-like indexing it is easy to reach out controls within loop. If I used Type decleration I would have to manually type each different bit of the myType type.
Many thanks in advance