+ Reply to Thread
Results 1 to 4 of 4

Adjust vba to handle multiple printers

  1. #1
    Registered User
    Join Date
    03-01-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    49

    Lightbulb Adjust vba to handle multiple printers

    Good Day,

    I need to adjust my current code to adapt where the printer will be on a network, depending on where the computer is located.

    Various network hubs are in use, so the NE code at the end changes.

    My current code is:

    Please Login or Register  to view this content.
    It has to cycle through, with no error the following:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne00:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne01:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne02:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne03:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne04:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne05:
    \\Csg\Star TSP100 Cutter (TSP143) on Ne06:

    If it still cannot print, it should display the messagebox "Cannot find a Printer"

    Currently all off network sheet bomb out with a debug message. I wan't to try and avoid this.

    Any help will be greatly appreciated.

    Kind Regards

    JEDEMEYER1

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Adjust vba to handle multiple printers

    Have a look here http://www.excelforum.com/tips-and-t...excel-vba.html

  3. #3
    Registered User
    Join Date
    03-01-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Adjust vba to handle multiple printers

    Thanks Kyle,

    But I don't know how to adjust my code to actually use this function.

    I tried the suggestion on the link:

    Please Login or Register  to view this content.
    But it does not work...

    Regards

    JEDEMEYER1

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Adjust vba to handle multiple printers

    You just need to replace my printer name with yours, that will then return the printer port. So change the knv etc


    Sent from my iPhone using Tapatalk

+ 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. Populate a combobox with a list of printers found on the (devices/printers) window
    By vladlock in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-12-2014, 08:10 AM
  2. how to handle multiple workbooks
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2014, 07:25 PM
  3. Printing to Multiple Printers in Excel
    By jmcdougal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 05:40 AM
  4. Printing to multiple printers
    By devile in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-01-2013, 05:22 AM
  5. [SOLVED] printing to multiple printers
    By gkm107 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2005, 10:06 AM

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