User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 427,203 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,227 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser: Programming Forums

1-D Arrays

Join Date: Mar 2008
Posts: 34
Reputation: clueless101 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
clueless101 clueless101 is offline Offline
Light Poster

1-D Arrays

  #1  
Apr 1st, 2008
This is my first exposure to arrays. I need to create a 1-dimensional string-based array with five elements. I need to assign 5 different names to the array. Use a for loop to iterate through each of the array elements, displaying the names in a message box.

I would truly appreciate it if someone could help me out on this...

Option Compare Database

Private Sub cmdPopulate_Click()
Dim myStringArray(1 To 5) As String
Dim x(1)
Dim y(2)
Dim x(3)
Dim x(4)
Dim x(5)

For x = 1 To 5

myStringArray(x) = "The value of myStringArray is " & x

Next x

For x = 1 To 5

MsgBox "AddItem myStringArray (x)"

Next x

End Sub
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 10:48 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC