Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check-in procedure using arrays

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i'm having trouble removing a number from an array after someone
checks in. i have an array of members numbered from 501 to 700
and i need to delete numbers in the array as they check in.
this is what i have so far

Dim member(501 To 700) As Integer
Dim nummembers As Integer

Private Sub cmdCheckIn_Click()

Dim bfound As Boolean
bfound = False

For i = 501 To 700
Let member(i) = i
Next i

Do Until bfound = True
For i = 501 To 700
If member(i) = Val(txtEnter.Text) Then

??????????????????????????????????

bfound = True
MsgBox "Your Name has been Entered."
Next i
Loop
End Sub



CAN ANYONE HELP, PLEASE?
 
For i = 501 To 700
If member(i) = Val(txtEnter.Text) Then
bFound = true
End If
If bFound = True Then
' if we find the entry, move next entries forward
' overwritting found entry
If i = UBound(member) Then
member(i) = ""
Else
member(i) = member(i + 1)
End If
End If
Next i


Doing it this way will allow you to ReDim Preserve the array, so that UBound(member) - 500 will tell you how many people are currently checked in.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top