473,378 Members | 1,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to array textbox(i).text this means how to array all the text of the textboxes in

I have many textbox in a form and I want to array the text of them, for example:
Expand|Select|Wrap|Line Numbers
  1. dim const max as integer=4
  2. dim c(1 to max) as string
  3. for i=1 to max
  4.    c(i)=textbox(i).text
  5. next i
Obviously this doesn't work.. Anyone knows how? please
May 2 '14 #1
1 1179
Luk3r
300 256MB
Well, your logic made sense... if only Visual Studio accepted that syntax :)

It's actually very easy, though. Give the below code a shot:
Expand|Select|Wrap|Line Numbers
  1. For Each txtBoxCtrl As TextBox In Controls.OfType(Of TextBox)()
  2.             MsgBox(txtBoxCtrl.Text)
  3.         Next
May 2 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: TDH | last post by:
Hi, I need to do a raw copy of a byte array to an Int16 array. For e.g., I have an byte array which has length 100, and I need to copy this to an Int16 array that has length 50. So 2 elements...
4
by: elziko | last post by:
I have a four dimensional array which I am trying to flatten into a single dimension array: Dim Array4D(10,10,10,10) as Single I can create my one dimensional array to be big enough to contain...
47
by: VK | last post by:
Or why I just did myArray = "Computers" but myArray.length is showing 0. What a hey? There is a new trend to treat arrays and hashes as they were some variations of the same thing. But they...
35
by: VK | last post by:
Whatever you wanted to know about it but always were affraid to ask. <http://www.geocities.com/schools_ring/ArrayAndHash.html>
8
by: Peter B. Steiger | last post by:
The latest project in my ongoing quest to evolve my brain from Pascal to C is a simple word game that involves stringing together random lists of words. In the Pascal version the whole array was...
10
by: Adam Warner | last post by:
Hi all, With this structure that records the length of an array of pointers as its first member: struct array { ptrdiff_t length; void *ptr; };
1
by: pompeez | last post by:
Hi, I need to write a Java Array/ArrayList/List to a text file in Jython. I used the .write() function, but it is letting me write only a string. Thanks! Pompeez
4
by: Badboy112 | last post by:
Hi guys i have used a data file like you guys have asked me to but im not entirely sure how to use the DataInputStream What i would like to do for this assigment is import the text from the data...
11
by: asmx126453 | last post by:
Hey Guys i need help with this last thing i cant get to work The error i get with it is: NullReferenceException was unhandled by user code Object reference not set to an instance of an...
1
by: Dan Effets | last post by:
I have simple array on this form but want to tie in another array for pictures.. Combobox select the Phone and this set the array to fit the other text boxes name,address,brithday. Now I want add a...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.