Thread: On Error Goto
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default On Error Goto

Where do you have "Below" defined? How does it equate to true?

If Err.Number < 0 Then
MsgBox "Please select another printer..."
Application.Dialogs(xlDialogPrinterSetup).Show
End If


"ryguy7272" wrote:

I've noticed some erratic behavior on our network printers and I'm trying to
trap any potential errors and allow a user to select another printer if there
is an error printing. This is my code:

On Error GoTo Below
Application.Dialogs(xlDialogPrinterSetup).Show
If Below = True Then
MsgBox "Please select another printer..."
End If

When I run the sub, I get a "Compile Error, Label not Defined" message. Can
someone please point my mistake.

Thanks,
Ryan--

--
RyGuy