Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the relationship between .ChartArea and the default printer ? Xavier Charts and Charting in Excel 0 May 3rd 06 02:53 PM
Printing from default printer Susan Excel Discussion (Misc queries) 1 February 1st 06 04:23 PM
excel macro to automatically change default printer James Bromley Excel Discussion (Misc queries) 1 January 15th 06 11:42 AM
how do i get excel to default print to fastdraft on my HP Printer Bigtalker Excel Discussion (Misc queries) 0 July 18th 05 10:02 PM
Calculate commissions Pete Petersen Excel Worksheet Functions 6 November 17th 04 10:15 PM


All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"