MACRO FOR PRINTER

G

Guest

I forgot to put the formula on my last message. If anyone
can help to recode this macro so after it gets done
printing a specific job, it default backs to "\\ALBPRN02
rather than "\\ALBPRN01, I would appreciate it. Thanks in
advacne.


Application.ActivePrinter = "\\ALBPRN01\finlj02 on
Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
"\\ALBPRN02\finlj02 on Ne03:", Collate:=True
 
D

Dave Peterson

Did you record a macro when you got this code?

If yes, then are you running this code from the same pc that created the macro?

If yes, then I have no idea.

But if you're running from a different pc, maybe the name of the printer is
different. (I'm guessing your last line failed.)

A couple of options:
Just show the printer selection dialog and let the user choose:

Application.Dialogs(xlDialogPrint).Show
'or
Application.Dialogs(xlDialogPrinterSetup).Show

or maybe you could just keep track of what the printer was and change it back:

Sub testme01()
Dim myPrinter As String
With Application
myPrinter = .ActivePrinter
.ActivePrinter = "your printer name here"
.Dialogs(xlDialogPrint).Show
.ActivePrinter = myPrinter
End With
End Sub

or if you really want to get the printers:
http://google.com/[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top