+ Reply to Thread
Results 1 to 5 of 5

VBA to Print to Printer that is not default

  1. #1
    Forum Contributor
    Join Date
    05-24-2014
    MS-Off Ver
    Microsoft Office 2013
    Posts
    113

    VBA to Print to Printer that is not default

    I have a spreadsheet where I am trying to print barcode labels. The barcode is found in cell A1. I have looked in a lot of places and I can't really figure out exactly how to do it. This is the code that I have so far but it gives me an error. The printer name should be right. Any suggestions on how to fix it? Some of this code I just copied from another thread.
    Please Login or Register  to view this content.
    Last edited by manofcheese; 06-05-2014 at 10:03 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: VBA to Print to Printer that is not default

    The macro recorder puts a colon after the selected printer name, so maybe:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    05-24-2014
    MS-Off Ver
    Microsoft Office 2013
    Posts
    113

    Re: VBA to Print to Printer that is not default

    Hmmm.... No dice. It says that there is no object for the sixth line of code. Do I need to turn on a reference for my printer somewhere?

  4. #4
    Forum Contributor
    Join Date
    05-24-2014
    MS-Off Ver
    Microsoft Office 2013
    Posts
    113

    Re: VBA to Print to Printer that is not default

    I played with it a little and it works great now. Here is the code I used.
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: VBA to Print to Printer that is not default

    Glad you figured it out
    1. Include a sample workbook with an example of the result you want
    2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
    3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. print to a user's default printer?
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2016, 12:28 PM
  2. [SOLVED] Macro to print to the default printer
    By Alves76 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-22-2013, 05:47 AM
  3. macro to print 2 copies to default printer, then 1 copy to Adobe PDF printer
    By jwright650 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2011, 01:07 PM
  4. macro print to default printer help
    By st24rsap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2009, 07:22 AM
  5. print to file instead of default printer
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2008, 12:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1