Excel - aclaracion datos

 
Vista:

aclaracion datos

Publicado por erayba (1 intervención) el 02/12/2006 13:57:07
como puedo, a la vista de este ejemplo que en cada observacion no las saque todas juntas sino que salga una por cada dato que falte y diciendo cual es la falta
esto es lo que esta en this wortkbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Range("I107") < 1 Or Range("T84") > 0 Or Range("K111") < 1 Or Range("T82") > 1 Or Range("h4") < 1 Or Range("H3") < 1 Or Range("q111") < 1 Then
a = MsgBox("FALTA DATO EN VENDEDOR O VENCIMI O TINTES O IMPORTE o FECHA o nº CLIENTE" & Chr(13) & _
"desea cerrar de todas formas ?", _
vbYesNo)
If a = vbNo Then Cancel = True
End If
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:aclaracion datos

Publicado por JuanC (792 intervenciones) el 02/12/2006 16:13:33
Haber si es esto lo que querés hacer....

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim bflg As Boolean, a%

bflg = False

If [I107] < 1 Then
MsgBox "Falta I107"
bflg = True
End If
If [T84] > 0 Then
MsgBox "Falta T84"
bflg = True
End If
If [K111] < 1 Then
MsgBox "Falta K111"
bflg = True
End If
If [T82] > 1 Then
MsgBox "Falta IT82"
bflg = True
End If
If [H4] < 1 Then
MsgBox "Falta H4"
bflg = True
End If
If [H3] < 1 Then
MsgBox "Falta H3"
bflg = True
End If
If [Q111] < 1 Then
MsgBox "Falta Q111"
bflg = True
End If

If bflg Then
a = MsgBox("FALTA DATO EN VENDEDOR O VENCIMI O TINTES O IMPORTE o FECHA o nº CLIENTE" & Chr(13) & _
"desea cerrar de todas formas ?", vbYesNo)
If a = vbNo Then Cancel = True
End If

End Sub

Saludos desde Baires, JuanC
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar