Private Sub cmdlimpiar_Click()
ComboBox1 = ""
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
ComboBox1.SetFocus
End Sub
Private Sub cmdsalir_Click()
Unload Me
End Sub
Private Sub cmdguardar_Click()
If ComboBox1 = "" Then
MsgBox ("Elegir el tipo de producto")
ComboBox1.SetFocus
Else
Dim fila As Long
fila = WorksheetFunction.CountA(Range("A:A")) + 13
Cells(fila, 7).Value = TextBox1.Value
Cells(fila, 8).Value = TextBox2.Value
Cells(fila, 9).Value = TextBox3.Value
Cells(fila, 11).Value = ComboBox1.Value
ComboBox1 = ""
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
ComboBox1.SetFocus
End If
End Sub
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
End Sub
Private Sub Label2_Click()
End Sub
Private Sub Label3_Click()
End Sub
Private Sub Label4_Click()
End Sub
End Sub
Private Sub UserForm_Activate()
ComboBox1.RowSource = "Tipos_de_producto"
End Sub
Private Sub UserForm_Click()
End Sub