Print Preview Macro

  • Thread starter Emanuel Violante
  • Start date
E

Emanuel Violante

Hi,

The code above is working fine, but it print always to the default printer.

How can i have the available printers, and then select the correct one???

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "CARDEX" Then
Cancel = True
Application.EnableEvents = False
Application.ScreenUpdating = False
With ActiveSheet
On Error Resume Next
.Columns("I").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden =
True
.Rows("1:6").EntireRow.Hidden = False
.PrintOut
.Columns("I").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden =
False
On Error GoTo 0
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top