|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Array
I have a textbox that contains only numbers.
and i declare an array: X(10) so, how do i input all the numbers of the textbox in the array? |
|
#2
|
|||
|
|||
|
One at a time?
x(0) = text0.text x(1) = text1.text x(2) = text2.text etc
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
sorry.. should be like this...
hmm... i make it clearer.. sorry.. it should be something like this...
"text1.text" contains alot of numbers, and i want to dump this whole number into an array. after that, i wanna use it to plot on MSChart e.g: mschart1.chartdata= myArray ===> this will plot a graph from "myArray" so my question is, how do i get all the data from text1.text... and place it properly in "myArray"?? |
|
#4
|
|||
|
|||
|
What do you mean by "a lot of numbers"?
Something like "1098347097652980932829867768761340952352" ? |
|
#5
|
|||
|
|||
|
ummm...
umm... ok.. i contain a text box...
and the textbox contains different numbers... this numbers are seperate by spaces... and i wish to put them in an array... lastly... i'll be using MSChart to plot a graph... the mschart require an array to plot a graph sorry... for making u trouble understanding.. i always have trouble pharsing |
|
#6
|
||||
|
||||
|
see use split function .split function split string by spaces.....
suppose.......below is a simple code for two values.10 20 this are values suppose u enterd in textbox name text1.split form a one dimensional array.in below case x will get two values x(0)=10 & x(1)=20.in ur text box numbers are must be seperated by space. bcoz this code is for spaces among the numbers.this is simple ex.u can get little bit idea from this code..........thanx...i m not good in vb sub dd() x=split(f1.text1.value) msgbox(x(0)) msgbox(x(1)) end sub |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|