I'm a beginner in VB and have an assingment where i have to use array, using input box to recieving array from t he user, such as first name and surname. then that array has to show in a listbox on the screen, does anyone know where i could begin, the amount of array should only be 11 names. thanks.

Hi
Array can be declared

[B]Dim Names([/B] [I]array_starting_index [/I][B]To[/B] [I]array_ending_index for first dimension[/I] , again for second dimension [B]) as[/B] DataType

Example
  Dim FName (10) as String

If array_starting_index is not mention then It takes default value 0
and Ending Index is 10. Totally 11 FirstNames it can contain.

I give an Example Program to read 11 Number from InputBox
> Open New Project in VB6
> Draw a ListBox (List1)
and try the below coding

'Form Level
  Dim Numbers(10) as Integer

  Private sub Form_Load()
   Dim i as Integer
   For i = 0 to 10
       Numbers (i) = Val(InputBox ("Enter Any Number"))
       List1.AddItem Numbers(i)
   Next i
 End sub

This is similar to Read 11 First name and Surname. You can Extend this with slight modification.
I Hope this will help u.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.