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

I figured this one out.

Thanks anyway!

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.