Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code (partial)
Dim CurrentPrinter As Variant Workbooks.Open Filename:="C:\Quotes\Quote Form.xls" Application.CutCopyMode = False CurrentPrinter = Application.ActivePrinter ' Store current printer. Application.ActivePrinter = "PDF995 on Ne00:" ' Change Printers." For i = 1 To 9 ' Check for correct Ne number Err.Clear On Error Resume Next Application.ActivePrinter = "printername on Ne0" & i & ":" If Err.Number = 0 Then Exit For On Error GoTo 0 Next ActiveWindow.SelectedSheets.PrintOut ' Print the active document. Application.ActivePrinter = CurrentPrinter I am trying to detect what the other NE0 number is on other computers that use this program, I can't get to work on my computer that uses NE01. What is wrong? oldjay |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Forgrt it I forgot to delete = Application.ActivePrinter = "PDF995 on Ne00:"
' Change Printers." "Oldjay" wrote: I have the following code (partial) Dim CurrentPrinter As Variant Workbooks.Open Filename:="C:\Quotes\Quote Form.xls" Application.CutCopyMode = False CurrentPrinter = Application.ActivePrinter ' Store current printer. Application.ActivePrinter = "PDF995 on Ne00:" ' Change Printers." For i = 1 To 9 ' Check for correct Ne number Err.Clear On Error Resume Next Application.ActivePrinter = "printername on Ne0" & i & ":" If Err.Number = 0 Then Exit For On Error GoTo 0 Next ActiveWindow.SelectedSheets.PrintOut ' Print the active document. Application.ActivePrinter = CurrentPrinter I am trying to detect what the other NE0 number is on other computers that use this program, I can't get to work on my computer that uses NE01. What is wrong? oldjay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print using PDF995 and cell value as filename | Excel Programming |