I'm trying to create a random name generator that actually chooses one of the names listed by me and places it in Textbox1, the problem is that it's not randomizing the choices, it's just always following the same order...
First click: Pedro Ribeiro
Second click: Paulo Lins
Third click: Rodrigo Martins
Etc...
Form...
Name Code...
Dim NameKey As Integer
NameKey = Int(Rnd() * 10)
Select Case NameKey
Case 0
TextBox1.Text = "Will"
Case 1
TextBox1.Text = "Bernardo"
Case 2
TextBox1.Text = "Manoel"
Etc...
Las name Code...
Dim LastNameKey As Integer
LastNameKey = Int(Rnd() * 10)
Select Case LastNameKey
Case 0
TextBox2.Text = "Monteiro"
Case 1
TextBox2.Text = "Ferraz"
Case 2
TextBox2.Text = "Lins"
Etc...
Aucun commentaire:
Enregistrer un commentaire