ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   automatically PRINT only active cells? (https://www.excelbanter.com/excel-discussion-misc-queries/20631-automatically-print-only-active-cells.html)

eab

automatically PRINT only active cells?
 
Can I set up a worksheet to automatically only print the active cells each
time it is printed?

Ron de Bruin

Hi eab

You can use this event in the Thisworkbook module

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
Application.EnableEvents = False
Selection.Areas(1).PrintOut
Application.EnableEvents = True
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl



"eab" wrote in message ...
Can I set up a worksheet to automatically only print the active cells each
time it is printed?





All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com