me gustaria que me ayudarais a controlar el error.
On Error GoTo denei
'Código posible error
If Not lbl_d.Caption = lbl_dni1.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni2.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni3.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni4.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni5.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni6.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni7.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni8.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni9.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
Else
If Not lbl_d.Caption = lbl_dni10.Caption Then
error = MsgBox("DNI no registrado", vbExclamation, "Error")
End If
End If
End If
End If
End If
End If
End If
End If
End If
el error creo que esta en la primera línea
On Error GoTo denei
pero nose como arreglar este error.
saludos