Hola:
Estoy renegando (perdiendo mucho timepo) con una rutina sencilla que me
permita cargar datos de un formulario a una hoja especifica de excel.
La cuestion radica en que ciertos textbox deben ser llenados si o si
Paso la sentencia para que me digan que tengo que hacer para que si no
cumple con alguno no carge los datos ingresados; por ende si los cumple
que si lo haga
Desde Ya gracias
Private Sub CommandButton1_Click()
If TextBox2.Text = "" Then
MsgBox "Se debe introducir un Nombre"
TextBox2.SetFocus
Else
If TextBox3.Text = "" Then
MsgBox "Se debe introducir una Dirección"
TextBox3.SetFocus
Else
If ComboBox1.Text = "" Then
MsgBox "Se debe introducir Localidad"
ComboBox1.SetFocus
End If
End If
End If
Exit Sub
Sheets("CLIENTES").Activate
NextRow = Application.WorksheetFunction.CountA(Range("B:B")) + 1
Cells(NextRow, 1) = TextBox1.Text
Cells(NextRow, 2) = TextBox2.Text
Cells(NextRow, 3) = TextBox3.Text
Cells(NextRow, 4) = TextBox4.Text
Cells(NextRow, 5) = TextBox5.Text
Cells(NextRow, 6) = ComboBox1.Text
Cells(NextRow, 7) = TextBox6.Text
Sheets("MENU").Activate
CommandButton1.Visible = False
Leer las respuestas