|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
if i have numbers 1 to 20 how can i store these numbers at run time? or i want the array not just to store 20 numbers but also 15 or 25 or 60 or 10 or 100 numbers at run time. Please show the codes
|
|
#2
|
||||
|
||||
|
So.. what you're looking for is a dynamically declared array? You can declare one like this
dim XArray() as integer dim intI as integer dim XValue as integer XValue = YourValue for intI = 1 to XValue redim preserve XArray(intI) XArray(intI) = StoredValue next inti VB 6 is very limited in what you can do with dynamically declared arrays, especially in the face of languages like C++ and JAVA. VB.Net is a little different, though - but I'm still learning the ins and outs of that one.
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#3
|
|||
|
|||
|
ok i'll try thnks in advance
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > storing in an array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|