I have a button on my slides that randomly picks a name from a list. When I had over 100 students it rarely called on a student twice. Now I have a class with less than ten and the names are duplicated too often. What I would like to do now is after a name has been selected that name is dropped from the list, but when one name is left, then the array is repopulated with the original list of names. The names need to continue to be in a random order no matter how many times the list is repopulated. I do not know where to start. It seems that either I need a second arrary or some loop or both. Here is my current code:
Private Sub UserForm_Initialize()
Me.StartUpPosition = 0 'From Top Left
Me.Top = 10
Me.Left = 30
Dim arr
Dim name As String
' Chooses a random student from a list
arr = Array("Bob", "Ted", "Carole", "Alice")
seed = TimeValue("00:" & Format(Second(Time), "00") & ":" & Format(Minute(Time), "00"))
Randomize (seed) name = arr(Int((4 * Rnd)))
' displays name in label caption
lblName.Caption = name
End Sub
Thank you in advance.