#1   Report Post  
Posted to microsoft.public.excel.misc
Emanuel Violante
 
Posts: n/a
Default Print Preview Macro

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).Entir eRow.Hidden =
True
.Rows("1:6").EntireRow.Hidden = False
.PrintOut
.Columns("I").SpecialCells(xlCellTypeBlanks).Entir eRow.Hidden =
False
On Error GoTo 0
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End If

--
Thanks,

Emanuel Violante Galeano
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie seeks suggestion on recording new macro to print sheets Vivian New Users to Excel 2 May 10th 06 06:53 AM
cell borders that I create dont show on print preview or print scott3435 Excel Discussion (Misc queries) 2 April 6th 06 02:37 AM
Excel becomes sluggish after print preview Tskod Excel Discussion (Misc queries) 0 March 27th 06 11:23 PM
Excel cell looks good in print preview but doesn't print??? Jack Gathright Excel Discussion (Misc queries) 1 September 13th 05 12:38 PM
Can't print diagonal borders although they show on print preview Excel-lover Excel Discussion (Misc queries) 7 August 30th 05 01:28 AM


All times are GMT +1. The time now is 04:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"