I have some code that tries to set 11x17 paper as a default...
On Error GoTo PageSizeErr
ActiveSheet.PageSetup.PaperSize = xlPaperTabloid
' more code here
PageSizeErr:
On Error GoTo PageErr2
ActiveSheet.PageSetup.PaperSize = xlPaper11x17 'try another 11x17 driver definition
GoTo resumePrinting
PageErr2:
MsgBox ("There's a problem setting Tabloid paper for the printer you have selected." & Chr(10) _
& "If you have an 11x17 printer selected, please contact EMBC, otherwise, try a different printer.")
Exit Sub
-------------- end of code sample -----------------
When it gets to the second 'ActivateSheet.PageSetup... line, instead of going to PageErr2 lable I get an error dialog box. (I have a printer selected that doesn't support 11x17 which is what I'm trying to test for.)
The multiple error handlers are needed as it seems that different printer drivers handle the setting the differently.
Why doesn't the second 'On Error goto ' statement get recognized?