Help with Array

wwprog
08-08-2007, 11:25 AM
I'm very new to programming and would appreciate very much if someone can help me.

I have 4 textboxes on my form, how to I input the data entered into the textboxes into an array? I'm using VB .net 2005.

ayman metwally
08-08-2007, 01:39 PM
'Declaration:
Dim myArray(3) as string

'Code
myArray(0)=TextBox1.Text
myArray(1)=TextBox2.Text
myArray(2)=TextBox3.Text
myArray(3)=TextBox4.Text


You have to put the above code under a suitable event (Perhaps the On Text change event of the Text box .. Just double click on the text box and the editor will generate the code for the event for you and you have)

I sugget studing a book like Teach your self ???? programmin in 21 days

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum