This "don't" compute.
=====
Dim Ans As String
Dim Data_Assigned_Printer As String
' =====================
' This works
' =====================
Ans = InputBox("Which Printer 1-2-3")
If Ans = "1" Then
Application.ActivePrinter = "Canon MX430 series Printer on Ne08:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Canon MX430 series Printer on Ne08:", Collate:=True
ElseIf Ans = "2" Then
Application.ActivePrinter = "CutePDF Writer on CPW2:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
ElseIf Ans = "3" Then
Application.ActivePrinter = "PDFCreator on Ne02:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"PDFCreator on Ne02:", Collate:=True
End If
' =====================
' This does not work
' =====================
If Data_Assigned_Printer <> "" Then Application.ActivePrinter = Data_Assigned_Printer
' =====================
' The value in Data_Assigned_Printer was copied from value above in Debug Mode
' Runtime errir '1004':
' Method 'ActivePrinter' of object '_Application' failed
' ?????
' =====================
Sorry my indentations in code did not come through in the post so it is a bit more difficult to read. Any help would be GREATLY appreciated.
Dan F.
Bookmarks