Necesito me orienten en este ejercicio de un Simulador de Horas de Televisión.

La pregunta es que me da un error cuando en el "frame Ingresar Fichas " el Button3, que es Ingresar Fichas .En el Textbox " ValorTotal.Text . No me toma el valor que figura del textBox 2 y que se multiplica por (30) que es el valor Total, el cual me dice en el Label la cantidad de horas que pude Ver televisión, en una habitación de un Sanatorio, Hospital, etc.

Con el teclado numérico ingreso el Nº de Habitación, Con el Butoon "correcto", aceta y me tralada al Label la cantidad de horas y minutos.

Este ejercicio que lo hago yo al ver esta maquina y decidí si se podía hacer en excel.

Envío Figura de la Máquina y el Código .Espero que lo puedan ver ya que no se como insertar Adjuntos en este página.

Private Sub cmdCero_Click()
 txthabitacion.Text = txthabitacion.Text + "0"
End Sub
Private Sub cmdCinco_Click()
    txthabitacion.Text = txthabitacion.Text + "5"
End Sub
Private Sub cmdcorrecto_Click()
   If txtValorTotal.Text = 30 Then
        lblHoras.Caption = "3 hs 30 minutos"
    Else
        If txtValorTotal.Text = 60 Then
            lblHoras.Caption = " 10 hs 15 minutos "
    Else
        If txtValorTotal.Text = 90 Then
            lblHoras.Caption = " 22 hs 45 minutos "
        End If
        End If
    End If
End Sub
Private Sub cmdCuatro_Click()
    txthabitacion.Text = txthabitacion.Text + "4"
End Sub
Private Sub cmdDos_Click()
    txthabitacion.Text = txthabitacion.Text + "2"
End Sub
Private Sub cmdLimpiar_Click()
    txthabitacion.Text = ""
    txtValorTotal.Text = ""
    txtCantidad.Text = ""
End Sub
Private Sub cmdNueve_Click()
    txthabitacion.Text = txthabitacion.Text + "9"
End Sub
Private Sub cmdocho_Click()
    txthabitacion.Text = txthabitacion.Text + "8"
End Sub
Private Sub cmdSeis_Click()
    txthabitacion.Text = txthabitacion.Text + "6"
End Sub
Private Sub cmdSiete_Click()
    txthabitacion.Text = txthabitacion.Text + "7"
End Sub
Private Sub cmdUno_Click()
     txthabitacion.Text = txthabitacion.Text + "1"
End Sub
Private Sub cmdTres_Click()
    txthabitacion.Text = txthabitacion.Text + "3"
End Sub
Private Sub CommandButton1_Click()
    txtCantidad.Text = 1
End Sub
Private Sub CommandButton2_Click()
    txtCantidad.Text = 2
End Sub
Private Sub CommandButton3_Click()
txtCantidad.Text = 3
End Sub
Private Sub txtCantidad_Change()
  If Val(txtCantidad.Text) = 1 Then
    txtValorTotal.Text = Str(Val(txtCantidad.Text) * 30)
 Else
    If Val(txtCantidad.Text) = 2 Then
        txtValorTotal.Text = Str(Val(txtCantidad.Text) * 30)
Else
    If Val(txtValorTotal.Text) = "3" Then
        txtValorTotal.Text = Str(Val(txtCantidad.Text) * 30)
End If
End If
End If
End Sub
Private Sub UserForm_Click()
End Sub

Añade tu respuesta

Haz clic para o