Hi,

I've been looking for a solution to my problem for a while now and I'm getting the feeling it's something simple I'm missing but I can't get it to work how I want, hope somebody can help.

So what I'm trying to do is print 2 separate sheets to 2 separate printers. The one printer is local, and the other is a network printer. I've got this part done and it works on the computer I mostly do these prints from.
But sometimes I have to use this file from another location, the network printer I could find a work around for since only the port could change if I'm correct. But the local printer needs to become something totally different. So to make it easy, I figured, I will set a printer for default use, but when it gives an error (because the port is wrong or printer can't be found) I let the printer select box come up and simply select the printer i want manually. Got all working up to there.

The annoying part now is, when I use the file now on the computer I do this from most of the time, the printer select box comes up all the time anyway when it doesn't have to. how do i skip this box when the 'default' printers are found?

Below the part of the Code that matters:


Dim Page1 as worksheet
Dim Page2 as worksheet
set Page1 = worksheets("Page1")
set Page2 = worksheets("Page2")


    page1.Cells(2, 5).Value = "links to cell for amount of copies"

    
    On Error Resume Next
    Application.ActivePrinter = "Name of local printer on Ne01:"
    Application.Dialogs(xlDialogPrinterSetup).Show
       Page1.PrintOut Copies:=page1.Range("H2").Value
    
    On Error Resume Next
    Application.ActivePrinter = "Network printer on Ne05:"
    Application.Dialogs(xlDialogPrinterSetup).Show
        Page2.PrintOut