|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Do I always have to declare a two dimensional array?
A variant does not allow me to assign it two dimensions. Is there a way? |
|
#2
|
||||
|
||||
|
This might work out better if you show some code of what you're trying to do.
Other than seeing code, I can say this: A variant variable can be assigned any type, but you can't just dynamically change that type. |
|
#3
|
||||
|
||||
|
There's a post around here where I showed what you can and can't do. It's pretty well explained in Help/MSDN under arrays. On my way out but if I have time later I'll see if I can dig up that other post and link and try to clarify.
__________________
medialint.com "Energy has the opportunity to change the climate if it's done right." - Sen. John Ensign, R-Nev. (quoted out of context) |
|
#4
|
|||
|
|||
|
Private t, tI, tII, tIID(1 To 3, 1 To 7), tGr(1 To 3, 1 To 7)
I do not want my tiid and tgr to be always 1 to 7 , but I want the dimension to expand, depending on the data, so I would not have empty cells. ![]() So if i would have four rows, I want the demension to be only four. Thanks Last edited by cavebear : April 12th, 2008 at 10:35 AM. |
|
#5
|
||||
|
||||
|
I'm afraid you can't do this dynamically. You basically can't define the array index value with a variable. You got to think of another approach.
|
|
#6
|
|||
|
|||
|
something like
Do until tGr = empty a=a+1 ... Loop to exclude empty cells No way to make a dynamical array. Thank you very much. Last edited by cavebear : April 14th, 2008 at 09:15 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Do I always have to declare a two dimensional array? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|