Como reparar este código de ingreso
Private Sub CommandButton1_Click()
'Declaración de variables
Dim Continuar As String
Dim TransRowRng As Range
Dim NewRow As Integer
Dim Limpiar As String
Continuar = MsgBox("Ingresar nuevo Miembro?", vbYesNo + vbExclamation, strTitulo)
If Continuar = vbNo Then Exit Sub
'
Cuenta = Application.WorksheetFunction.CountIf(Range("A:A"), Me.TextBox1)
'
If Cuenta > 0 Then
MsgBox "La Cedula'" & Me.TextBox1 & "' ya se encuentra registrada", vbExclamation, strTitulo
Else
Set TransRowRng = ThisWorkbook.Worksheets("BD").Cells(1, 1).CurrentRegion
NewRow = TransRowRng.Rows.Count + 1
With ThisWorkbook.Worksheets("BD")
.Cells(NewRow, 1).value = Val(Me.TextBox1)
If Me.TextBox1 = "" Then
MsgBox "Debe Ingresar un Nombre", vbExclamation, strTitulo
TextBox2.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 2).value = Me.TextBox2
If Me.TextBox3 = "" Then
MsgBox "Debe Ingresar un Apellido", vbExclamation, strTitulo
TextBox2.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 3).value = Me.TextBox3
If Me.OptionButton1 Or Me.OptionButton2 = "" Then
MsgBox "Debe Ingresar tipo de Sexo", vbExclamation, strTitulo
TextBox3.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 4).value = Me.OptionButton1.Caption Or Me.OptionButton2.Caption
If Me.TextBox4 = "" Then
MsgBox "Debe Ingresar Número de Teléfono Local", vbExclamation, strTitulo
TextBox4.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 5).value = Me.TextBox4
If Me.TextBox5 = "" Then
MsgBox "Debe Ingresar Número de Teléfono Local", vbExclamation, strTitulo
TextBox4.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 6).value = Me.TextBox5
If Me.TextBox5 = "" Then
MsgBox "Debe Ingresar Número de Teléfono Celular", vbExclamation, strTitulo
TextBox5.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 7).value = Me.TextBox6
If Me.TextBox6 = "" Then
MsgBox "Debe Ingresar Correo Eléctronico", vbExclamation, strTitulo
TextBox6.SetFocus
SendKeys "{Home}+{End}"
Else
If Me.ComboBox1 = "" Then
MsgBox "Debe Ingresar Status", vbExclamation, strTitulo
ComboBox1.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 8).value = Me.ComboBox1
If Me.TextBox7 = "" Then
MsgBox "Debe Ingresar un Sector", vbExclamation, strTitulo
TextBox7.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 9).value = Me.TextBox8
If Me.TextBox8 = "" Then
MsgBox "Debe Ingresar la Dirección", vbExclamation, strTitulo
TextBox8.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 10).value = Me.TextBox8
If Me.CheckBox1 = "" Then
Me.TextBox12 = ""
Me.TextBox13 = ""
Me.TextBox15 = ""
Else
.Cells(NewRow, 13).value = Me.CheckBox1
If Me.TextBox9 = "" Then
MsgBox "Debe Ingresar N° de Planillas Entregadas", vbExclamation, strTitulo
TextBox9.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 11).value = Me.TextBox9
If Me.TextBox12 = "" Then
MsgBox "Debe Ingresar Total de Electores Aportados", vbExclamation, strTitulo
TextBox12.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 12).value = Me.TextBox12
If Me.TextBox13 = "" Then
MsgBox "Debe Ingresar la Fecha de Entrega", vbExclamation, strTitulo
TextBox13.SetFocus
SendKeys "{Home}+{End}"
Else
.Cells(NewRow, 14).value = Me.TextBox13
If Me.TextBox15 = "" Then
MsgBox "Debe Ingresar el Total de Electores Verificados", vbExclamation, strTitulo
TextBox15.SetFocus
SendKeys "{Home}+{End}"
.Cells(NewRow, 15).value = Me.TextBox15
End With
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
MsgBox "Ingreso de Datos Exitoso.", vbInformation, strTitulo
'Unload Me
End Sub