Work refreshed our computers (Dell Optiplex 790), and some of my custom code doesn't work anymore. Specifically: Excel.Application.ActivePrinter was used to toggle between two printers for output. I don't get any error messages, but it will not change the
default printer on command. This used to work fine with the old machine running XP. Here is the code I used in the past. There is a lot more to my project, but this is my development code. All librarys appear to be present and referenced.
Private Sub Printer1_Click()
On Error Resume Next
Excel.Application.ActivePrinter = "ZDesigner 110XiIII Plus (300DPI) on Ne01:"
Excel.Application.ActivePrinter = "ZDesigner 110XiIII Plus (300DPI) on Ne00:"
On Error Resume Next
Excel.Application.ActivePrinter = "ZDesigner 110XiIII Plus (300DPI) on Ne00:"
Excel.Application.ActivePrinter = "ZDesigner 110XiIII Plus (300DPI) on Ne01:"
MsgBox "The name of the active printer is " & _
Excel.Application.ActivePrinter
End Sub
Private Sub Printer2_Click()
On Error Resume Next
Excel.Application.ActivePrinter = "WA07PRLBP25989 Bldg 6-Room 4-Pure Metals on Ne00"
Excel.Application.ActivePrinter = "WA07PRLBP25989 Bldg 6-Room 4-Pure Metals on Ne01"
On Error Resume Next
Excel.Application.ActivePrinter = "WA07PRLBP25989 Bldg 6-Room 4-Pure Metals on Ne01"
Excel.Application.ActivePrinter = "WA07PRLBP25989 Bldg 6-Room 4-Pure Metals on Ne00"
MsgBox "The name of the active printer is " & _
Excel.Application.ActivePrinter
End Sub