Evitar pasar a otro formulario sin que se haya terminado de capturar todos los datos
Tengo un formulario de captura y lo que quiero es que no puedan pasar a otro formulario sin que haya terminado de registrar toda la información necesaria del primer formulario.
Ya tengo una macro pero solo me manda los avisos que indican que hace falta capturar datos pero me abre el siguiente formulario
Mi Usefrorm1 es el de captura y al terminar de llenar la información captura la informacion en una hoja de excel y llama al Userform3. Espero haber sido claro en mi consulta. Anexo mi macro
Private Sub CommandButton2_Click()
If TextBox5.Text = "" Then
MsgBox "Ingrese fecha"
Else
If Código.Text = "" Then
MsgBox "Ingrese su numero de Registro"
Else
If Nombre.Text = "" Then
MsgBox "Ingrese nombre"
Else
If Apellidos.Text = "" Then
MsgBox "Ingrese apellidos"
Else
If DNI.Text = "" Then
MsgBox "Ingrese numero de registro"
Else
If ComboBox3 = "" Then
MsgBox "Seleccione un Tipo de Falla"
Else
If ComboBox1 = "" Then
MsgBox "Seleccione un Aplicativo"
Else
If ComboBox2 = "" Then
MsgBox "Seleccione un Dispositivo"
Else
If TextBox9.Text = "" Then
MsgBox "Ingrese una Posicion"
Else
Worksheets("Hoja3").Select
ult1 = Cells(Rows.Count, 1).End(xlUp).Row
ult1 = ult1 + 1
Cells(ult1, 1) = Nombre.Text
Cells(ult1, 2) = Apellidos.Text
Cells(ult1, 3) = DNI.Text
Cells(ult1, 4) = ComboBox3.Value
Cells(ult1, 6) = ComboBox2.Value
Cells(ult1, 5) = ComboBox1.Value
Cells(ult1, 8) = TextBox9.Text
Cells(ult1, 9) = TextBox5.Text
Cells(ult1, 10) = TextBox10.Text
Cells(ult1, 7) = OptionButton1.Caption
Cells(ult1, 7) = OptionButton2.Caption
End If
End If
End If
End If
End If
End If
End If
End If
End If
UserForm3.Show
End Sub
1 Respuesta
Respuesta de Dante Amor
1