Merci lami20j d'avoir épondu aussi rapidement mais mon problème n'est pas entièrement résolu ceci est le début de ma macro
sub Imp1
dim repMsgBox as string
repMsgBox=msgbox("Voulez-vous imprimer cet état ?",289)
mais quelles sont les fonctions qui doivent suivre de manière à ce que lorsque je clic sur le bouton annuler il sorte de la macro et si je clic sur ok il poursuive ma macro ci dessous
oDocument = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$B$26:$R$43"
dispatcher.executeDispatch(oDocument, ".uno:GoToCell", "", 0, args1())
dim args2(2) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Copies"
args2(0).Value = 1
args2(1).Name = "Selection"
args2(1).Value = true
args2(2).Name = "Collate"
args2(2).Value = false
dispatcher.executeDispatch(oDocument, ".uno:Print", "", 0, args2())
End sub
merci


