+ Reply to Thread
Results 1 to 3 of 3

How Can I select specific printer in existing VBA Code

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    701

    How Can I select specific printer in existing VBA Code

    Hi Friends,

    I am using below code for printing specific sheets. But in this VBA Printer is default. Can you please edit this code, so that I can choose printer.

    Option Explicit
    
    Sub PrintWhitepages()
    Dim LC As String
    Dim DP As String
    Dim DA As String
    
    If Sheets("DATA - SALES").Range("J8").Text = "LC" Then
        ThisWorkbook.Sheets("INV").PrintOut Copies:=1
        ThisWorkbook.Sheets("PL").PrintOut Copies:=1
        ThisWorkbook.Sheets("COO").PrintOut Copies:=1
        ThisWorkbook.Sheets("COWt").PrintOut Copies:=1
        ThisWorkbook.Sheets("COW").PrintOut Copies:=1
        ThisWorkbook.Sheets("Bene Cert").PrintOut Copies:=1
        ThisWorkbook.Sheets("Analysis Cert").PrintOut Copies:=1
        ThisWorkbook.Sheets("Test Cert").PrintOut Copies:=1
    End If
    Call setCellFocus
    End Sub
    
    
    Sub setCellFocus()
    Dim sht As Worksheet, csheet As Worksheet
    
    Application.ScreenUpdating = False
    Set csheet = Sheets("DATA - SALES")
    csheet.Activate
    Range("A1").Select
    Application.ScreenUpdating = True
    
    End Sub
    Thank you friends.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How Can I select specific printer in existing VBA Code

    Application.Dialogs(xlDialogPrinterSetup).Show
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    701

    Re: How Can I select specific printer in existing VBA Code

    Thank you humdingaling

+ 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. [SOLVED] Solution to changing Default printer code when printer changes
    By Sintek in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-28-2016, 03:12 PM
  2. VBA or Macro to select a specific printer profile?
    By DanGres in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2015, 02:39 PM
  3. [SOLVED] Modify existing code to select file instead of select folder
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 09:41 AM
  4. Printer select code help please.
    By 4lowie in forum Excel General
    Replies: 2
    Last Post: 03-24-2014, 04:10 AM
  5. VBA print code to pop up msgbox if I choose a non existing printer
    By loroverde in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 01:16 PM
  6. VBA code to print Userform to specific Printer
    By RossN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2012, 06:03 PM

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