IF mas MSGBOX

Hola que tal he creado un botón que al hacer clic, realice un sentencia if, y luego imprima un formulario, deseo que cuando haga esa sentencia if, me pregunte si deseo continuar o no, he llegado hasta aquí, pero no logro hacer que al cliquear en SI o NO, imprima o no
Sub Botón54_AlHacerClic()
If Range("AS41") <> 0 Then MsgBox "DISTRIBUCIÓN DE PAYLOAD DIFIERE DE LO MANIFESTADO, Desea Continuar?", vbInformation + vbYesNo, "ATENCIÓN"
Application.ScreenUpdating = False
Sheets("Loadsheet for print").Select
Range("aq10") = Time
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("B1"), Collate:=True
Sheets("LOADSHEET").Select
Application.ScreenUpdating = True
End Sub
Agradecería su ayuda.

1 Respuesta

Respuesta
1
Cambia tu código por este
Sub Botón54_AlHacerClic()
If Range("AS41") <> 0 & MsgBox("DISTRIBUCIÓN DE PAYLOAD DIFIERE DE LO MANIFESTADO, Desea Continuar?", vbInformation + vbYesNo, "ATENCIÓN") = vbOK Then
Application.ScreenUpdating = False
Sheets("Loadsheet for print").Select
Range("aq10") = Time
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("B1"), Collate:=True
Sheets("LOADSHEET").Select
Application.ScreenUpdating = True
End If
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas