andieje

asked on

# Powerpoint 2003 VBA - obtaining 5 random numbers

Hello

In VBA, how can I obtain 5 random numbers from a range. Lets say the range is 1-50, I want to get 5 numbers at random from this range and each number picked must only occur once.

4, 45, 23, 16, 12 = ok

4, 45, 12, 23, 12 = not ok as 12 is repeated

Thanks

In VBA, how can I obtain 5 random numbers from a range. Lets say the range is 1-50, I want to get 5 numbers at random from this range and each number picked must only occur once.

4, 45, 23, 16, 12 = ok

4, 45, 12, 23, 12 = not ok as 12 is repeated

Thanks

See the other answer. The code is easily adapted to do this

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.