I am totally lost with arrays. I have a program that needs to store users entries(first & last name...etc) in 2 different arrays. The summary button then loops through each array and outputs their contents to the immediate window. Then the exit button displays the number of items in each array and an average. Please help...Thnx

Write a program to determine a person's weekly pay, where they receive time and a half for overtime work beyond forty hours.

Sure, I can help you with that! Here's a step-by-step guide on how to use arrays in your program:

1. Declare the arrays: You need to declare two arrays, one for storing the first names and another for the last names. You can declare them like this:
```vb
Dim firstNameArray() As String
Dim lastNameArray() As String
```

2. Initialize the arrays: Before you can use the arrays, you need to initialize them with a specific size. You can do this using the `ReDim` statement. For example, if you want to store 100 entries, you can initialize the arrays like this:
```vb
ReDim firstNameArray(100)
ReDim lastNameArray(100)
```

3. Storing user entries: Whenever a user enters their first and last names, you can store them in the corresponding arrays. You need to keep track of the current index position in the arrays to know where to store the next entry. Let's assume you have a function called `StoreEntry` that takes the user's first and last names as parameters, you can use it like this:
```vb
Sub StoreEntry(firstname As String, lastname As String)
' First, find the next empty position in the arrays
Dim nextIndex As Integer
nextIndex = 0
While firstNameArray(nextIndex) <> ""
nextIndex = nextIndex + 1
Wend

' Store the user's entries at the next empty position
firstNameArray(nextIndex) = firstname
lastNameArray(nextIndex) = lastname
End Sub
```

4. Outputting contents: To loop through each item in the arrays and output their contents to the immediate window, you can use a loop. Here's an example of how you can do it:
```vb
Sub OutputContents()
Dim i As Integer
For i = 0 To UBound(firstNameArray)
If firstNameArray(i) <> "" Then
Debug.Print "First Name: " & firstNameArray(i) & " Last Name: " & lastNameArray(i)
End If
Next i
End Sub
```

5. Counting items and calculating average: To display the number of items in each array and calculate their average, you can use the `UBound` function to get the upper bound of the arrays. Here's an example:
```vb
Sub DisplaySummary()
Dim firstNameCount As Integer
Dim lastNameCount As Integer
Dim averageLength As Double

' Count the number of items in each array
firstNameCount = UBound(firstNameArray) + 1
lastNameCount = UBound(lastNameArray) + 1

' Calculate the average length of the names
averageLength = (Len(Join(firstNameArray, "")) + Len(Join(lastNameArray, ""))) / (firstNameCount + lastNameCount)

' Display the results
MsgBox "Number of First Names: " & firstNameCount & vbNewLine & _
"Number of Last Names: " & lastNameCount & vbNewLine & _
"Average Name Length: " & averageLength
End Sub
```

That's it! You now have a program with two arrays for storing user entries, a summary button that outputs their contents, and an exit button that displays the number of items in each array and calculates the average.