Dear Experts
I have a excel sheet, which I need to print on a particular printer due to page setup.
Code I use to print is as below
When I select print option, printer dialogue box appears and prints on selected printer. My problem is , when I press cancell on dialogue box, it still prints on default printer. I wish to abort printing when cancel button is clicked on print dialogue box.
Thank you.
I have a excel sheet, which I need to print on a particular printer due to page setup.
Code I use to print is as below
Sub PrintChq()
Application.Dialogs(xlDialogPrinterSetup).Show
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Sheet1").Select
End Sub
When I select print option, printer dialogue box appears and prints on selected printer. My problem is , when I press cancell on dialogue box, it still prints on default printer. I wish to abort printing when cancel button is clicked on print dialogue box.
Thank you.