Hi, I'm writing a simple game in VB6 which selects one of three balls at random to drop towards a paddle underneath it. The user then presses a button to activate the correct paddle and catch the ball. This worked fine for a while and the balls dropped randomly but then it stopped working. This is the code I was using for the random number generator:

Code:
Private Function RandomNumber() As Integer
    'generate a random number between 0 and 2
    Randomize
    randNum = Int(Rnd * 3)
'End Function
This is the only place the random number is used:
Code:
Dim RandNum As Integer
If dropping = False Then      'if no ball is dropping
    RandomNumber          'generate a random number
    dropping_ball = randNum
    dropping = True         'drop a ball
End If
I tried outputing RandNum in a textbox and saw that it is always at zero. I also tried giving it a different value when it was initialised but it always reset to zero. This makes me think that the generator is working but it could just be picking the same number each time. I have no idea why it's doing this if so because this code is exactly the same as before when it was working. As it was working, I had no need to change it so I didn't.

Does anyone have any idea how to fix this?

Thanks,
Mooncinder