print using other printer than the default printer

mark692

Active Member
Joined
Feb 27, 2015
Messages
314
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
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

jolivanes

Well-known Member
Joined
Sep 5, 2004
Messages
1,918
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
314
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,625
Messages
5,832,748
Members
430,163
Latest member
YesImAk

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top