print using other printer than the default printer

mark692

Active Member
Joined
Feb 27, 2015
Messages
306
Office Version
  1. 2016
Platform
  1. Windows
hi guys i have this macro code

VBA Code:
Range("Table24").Select
Selection.Copy
ActiveSheet.Cells(Rows.Count, 50).End(xlUp).Select
Do While ActiveCell = Empty
    ActiveCell.Offset(-1, 0).Select
    Loop
    ActiveCell.Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

       
''put printer macro here

on the last part of my macro i want to put a code that will print my table, my problem is when i put this code

VBA Code:
ActiveSheet.PrintOut

the worksheet is printed using my default printer. i want a code that will print my worksheet using my other printer. thanks
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

jolivanes

Well-known Member
Joined
Sep 5, 2004
Messages
1,670
Office Version
  1. 2013
  2. 2007
Platform
  1. Windows
I know you said that the printer problem is solved but just out of curiosity, what does this do?
Code:
ActiveSheet.Cells(Rows.Count, 50).End(xlUp).Select
Do While ActiveCell = Empty
    ActiveCell.Offset(-1, 0).Select
    Loop
    ActiveCell.Offset(1, 0).Select
 

mark692

Active Member
Joined
Feb 27, 2015
Messages
306
Office Version
  1. 2016
Platform
  1. Windows
I know you said that the printer problem is solved but just out of curiosity, what does this do?
Code:
ActiveSheet.Cells(Rows.Count, 50).End(xlUp).Select
Do While ActiveCell = Empty
    ActiveCell.Offset(-1, 0).Select
    Loop
    ActiveCell.Offset(1, 0).Select

that codes are part of my project on my worksheet :D it paste copied data to another table then print the table after pasting
 

Watch MrExcel Video

Forum statistics

Threads
1,118,765
Messages
5,574,116
Members
412,572
Latest member
Chriszion
Top