ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Error Settind Default Printer in VBA (https://www.excelbanter.com/excel-discussion-misc-queries/105664-error-settind-default-printer-vba.html)

Vassago

Error Settind Default Printer in VBA
 

Hello,

When I try to run the following code in a macro:

Sub PrintToAnotherPrinter()

Dim STDprinter As String

STDprinter = Application.ActivePrinter

ActivePrinter = "Adobe PDF on Ne02"

End Sub


I am getting an error code that looks like this:

Microsoft Visual Basic
Red Cross "400"
OK Help

Help brings up a blank screen and OK just cancels the operation. Can
anyone help me with my code?

Thanks!


--
Vassago
------------------------------------------------------------------------
Vassago's Profile: http://www.excelforum.com/member.php...o&userid=36906
View this thread: http://www.excelforum.com/showthread...hreadid=572880



All times are GMT +1. The time now is 02:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com