Hi,
I have this code to print from macro, I like to add if I cancle it then it does not print.
Thanks,Private Sub MyPrint() Application.Dialogs(xlDialogPrinterSetup).Show ActiveWindow.SelectedSheets.PrintOut preview:=False End Sub
RR
Hi,
I have this code to print from macro, I like to add if I cancle it then it does not print.
Thanks,Private Sub MyPrint() Application.Dialogs(xlDialogPrinterSetup).Show ActiveWindow.SelectedSheets.PrintOut preview:=False End Sub
RR
This will do the job:
Private Sub MyPrint() ans = Application.Dialogs(xlDialogPrinterSetup).Show If ans = vbTrue Then ActiveWindow.SelectedSheets.PrintOut preview:=False End If End Sub
Happy Computing ,
Xlbiznes.
To show your appreciation please click *
Thanks xlbiznes It works
Your welcome, glad i could help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks