Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/10/2009, 14:19
agus0
 
Fecha de Ingreso: mayo-2009
Mensajes: 94
Antigüedad: 17 años, 4 meses
Puntos: 3
Respuesta: Generador de Numeros

Numeros al azar?
seria asi:

Código PHP:
Private Function Aleatorio(Minimo As Long, Maximo As Long) As Long
Randomize  inicializar la semilla
Aleatorio 
= CLng((Minimo - Maximo) * Rnd + Maximo)
End Function

Private 
Sub Command1_Click()
Text1.Text = Aleatorio(1000, 9999)
Text2.Text = Aleatorio(1000, 9999)
Text3.Text = Aleatorio(1000, 9999)
Text4.Text = Aleatorio(100000, 999999)
Text4.Text = Text4.Text & Aleatorio(10000, 99999)
End Sub