Hiya,
I have 10 people and need to assign 10 random numbers between 1 and 10 for random seating purposes each time.My code so far is below but assigns sometimes the same numbers. How can I make it so that once a number is used it won't be produced for the other seats?
'Pick random numbers to determin where we're all going to sit
Dim LiRandomNumber As Integer
'Player 1
LiRandomNumber = Int(10 * Rnd) + 1
Label42.Caption = LiRandomNumber
'Player 2
LiRandomNumber = Int(10 * Rnd) + 1
Label43.Caption = LiRandomNumber
'Player 3
LiRandomNumber = Int(10 * Rnd) + 1
Label44.Caption = LiRandomNumber
'Player 4
LiRandomNumber = Int(10 * Rnd) + 1
Label45.Caption = LiRandomNumber
'Player 5
LiRandomNumber = Int(10 * Rnd) + 1
Label46.Caption = LiRandomNumber
'Player 6
LiRandomNumber = Int(10 * Rnd) + 1
Label47.Caption = LiRandomNumber
'Player 7
LiRandomNumber = Int(10 * Rnd) + 1
Label48.Caption = LiRandomNumber
'Player 8
LiRandomNumber = Int(10 * Rnd) + 1
Label49.Caption = LiRandomNumber
'Player 9
LiRandomNumber = Int(10 * Rnd) + 1
Label50.Caption = LiRandomNumber
'Player 10
LiRandomNumber = Int(10 * Rnd) + 1
Label51.Caption = LiRandomNumber