I have a form with an array of textboxes. A different number, between -12 and 12, loads into the textboxes at random when the form loads.

I use this code:

Private Sub Form_Load()
Randomize Timer
Text5(0).Text = Int((10 + 13) * Rnd - 10)
Text5(1).Text = Int((10 + 13) * Rnd - 10)
Text5(2).Text = Int((10 + 13) * Rnd - 10)
Text5(3).Text = Int((10 + 13) * Rnd - 10)
Text5(4).Text = Int((10 + 13) * Rnd - 10)
Text5(5).Text = Int((10 + 13) * Rnd - 10)
Text5(6).Text = Int((10 + 13) * Rnd - 10)
Text5(7).Text = Int((10 + 13) * Rnd - 10)
For X = 0 To 7
If Rnd > 0.5 Then
Text5(X).Text = "+" & Int(Rnd * 12)
End If
Next X

I want to have it so that '0' doesn't appear in the textboxes - if it happens to come up at random. I thought that placing the code below, between the 'End If' and 'Next X' above, would do it. but it doesn't:

If Val(Text5(index).Text) = 0 Then
Text5(index).Text = "3"
End If

Could someone please tell me how I can do it?

Thanks!