Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi I use the following macro below to print only desired sheets,
Sub PrintButton_Click() 'to start stop screen updating (stops screen flicker) Application.ScreenUpdating = False Sheets("Cover").Select Application.Dialogs(xlDialogPrint).Show Sheets("sheet2").Select If Range("Calcs!i1") = True Then ActiveWindow.SelectedSheets.PrintOut Copies:=1 End If Sheets("sheet3").Select If Range("Calcs!f1") = True Then ActiveWindow.SelectedSheets.PrintOut Copies:=1 End If 'etc etc End sub This works as required! This macro is linked to a control button, when pressed the user sees the standard excel print screen where they can select their printer, and then print, no problems. If however the user decides for some reason to then press the cancel button, I you get a run error, I was wondering if it would be possible such if they press cancel, it goes back to the sheet called cover instead of getting the run error? -- This post was created using recycled electrons! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help (Uppercase multiple ranges?) | Excel Discussion (Misc queries) | |||
Macro question | Excel Worksheet Functions | |||
Error using a macro to print multiple pages. | Excel Discussion (Misc queries) | |||
Macro question | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) |