title: Generate random numbers without repeat
body: <p>I've seen lots of tutorials, but it seems none works for me. I need to generate random numbers without repeating.</p>
  
  <p>This is my code:</p>
  
  <pre><code>Dim intNumber As Integer
      Dim arrNumber(0 To 0) As Integer
      Dim i, x, y As Integer
      'Make sure the Label is clear
      Label1.Text = ""
  
  
  
      For x = 0 To 0
  Start:
          intNumber = Int((25 * Rnd()) + 1) ' Random number 1 to 25
          For y = 0 To 0
              ' Check arrNumber (y)
              'If intnumber has already been selected,
              'Then go and select another one.
              If intNumber = arrNumber(y) Then
                  GoTo Start
              End If
          Next y
  
          'Place the next non-repeated number in the arrNumber(x).
  
          arrNumber(x) = intNumber
  
  
      Next x
  
      '----------------------------------------------------
      For i = 0 To 0
  
          Label1.Text = Label1.Text &amp; (arrNumber(i))
          broj1.random.Text = Label1.Text
      Next
  
  End Sub
  </code></pre>