Alguien que me diga la parte del codigo mio que esta mal?
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Private Sub Form_Load()
Dim i As Integer
Dim j As Integer
Dim sigue As Boolean
Dim ran As Integer
ReDim Equipo(frmChampion.ListNombre.ListCount)
ReDim Nombre(frmChampion.ListNombre.ListCount)
Cant = frmChampion.ListNombre.ListCount
For i = 0 To UBound(Nombre)
Do
Randomize
ran = Int(Rnd() * Cant + 1)
Loop While Nombre(ran) <> vbNullString
Nombre(ran) = frmChampion.ListNombre.List(i)
For j = 0 To Cant
If Nombre(j) = vbNullString Then
sigue = True
End If
Next
If sigue = False Then
Exit For
End If
Next
For j = 0 To UBound(Nombre)
Debug.Print Nombre(j)
Next
End Sub
Private Sub cmdOK_Click(Index As Integer)
Cant = Cant - 1
Equipo(Index) = txtTeam(Index) ' guardamos en un array el equipo
cmdOK(Index).Enabled = False ' deshabilitamos el boton que se presionó
'------------------------------------------------------------------
If Cant > 0 Then ' si Cant es mayor que 0
Me.Height = Me.Height + 400
cmdListo.Top = cmdListo.Top + 400
Load lbljugador(lbljugador.ubound + 1)
lbljugador(lbljugador.ubound).Visible = True
lbljugador(lbljugador.ubound).Caption = "Nombre A"
lbljugador(lbljugador.ubound).Height = lbljugador(0).Height
lbljugador(lbljugador.ubound).Width = lbljugador(0).Width
lbljugador(lbljugador.ubound).Top = lbljugador(lbljugador.ubound - 1).Top + 400
Load txtTeam(txtTeam.ubound + 1)
txtTeam(txtTeam.ubound).Visible = True
txtTeam(txtTeam.ubound).Text = "Team FC"
txtTeam(txtTeam.ubound).Height = txtTeam(0).Height
txtTeam(txtTeam.ubound).Width = txtTeam(0).Width
txtTeam(txtTeam.ubound).Top = txtTeam(txtTeam.ubound - 1).Top + 400
Load cmdOK(cmdOK.ubound + 1)
cmdOK(cmdOK.ubound).Visible = True
cmdOK(cmdOK.ubound).Caption = "OK"
cmdOK(cmdOK.ubound).Height = cmdOK(0).Height
cmdOK(cmdOK.ubound).Width = cmdOK(0).Width
cmdOK(cmdOK.ubound).Top = cmdOK(cmdOK.ubound - 1).Top + 400
Else
cmdListo.Enabled = True ' cuando cant es = 0 nos trae aca y habilitamos el boton
End If
End Sub
Private Sub cmdOK_Click(Index As Integer)
Me.Height = Me.Height + 400
cmdListo.Top = cmdListo.Top + 400
Load lbljugador(lbljugador.UBound + 1)
lbljugador(lbljugador.UBound).Visible = True
lbljugador(lbljugador.UBound).Caption = "Nombre A"
lbljugador(lbljugador.UBound).Height = lbljugador(0).Height
lbljugador(lbljugador.UBound).Width = lbljugador(0).Width
lbljugador(lbljugador.UBound).Top = lbljugador(lbljugador.UBound - 1).Top + 400
Load txtTeam(txtTeam.UBound + 1)
txtTeam(txtTeam.UBound).Visible = True
txtTeam(txtTeam.UBound).Text = "Team FC"
txtTeam(txtTeam.UBound).Height = txtTeam(0).Height
txtTeam(txtTeam.UBound).Width = txtTeam(0).Width
txtTeam(txtTeam.UBound).Top = txtTeam(txtTeam.UBound - 1).Top + 400
Load cmdOK(cmdOK.UBound + 1)
cmdOK(cmdOK.UBound).Visible = True
cmdOK(cmdOK.UBound).Caption = "OK"
cmdOK(cmdOK.UBound).Height = cmdOK(0).Height
cmdOK(cmdOK.UBound).Width = cmdOK(0).Width
cmdOK(cmdOK.UBound).Top = cmdOK(cmdOK.UBound - 1).Top + 400
End Sub