Please help to set print area automatically

Solved/Closed
D - Jun 7, 2010 at 10:37 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 7, 2010 at 05:00 PM
Hello,

I have an issue with print areas. I have a worksheet with equations in it up to cell # 5000. However, most of the time, the equations usually only fill up to 1000 or 2000. Is there a way to automatically get the worksheet to print only the cells that are filled in and not the cells that have an equation in them but appear blank?

Thank you so much for any type of solution!

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 7, 2010 at 10:52 AM
You can define the print area in this routine i think
This is the workbook level routine

Private Sub Workbook_BeforePrint(Cancel As Boolean)

End Sub
0
rizvisa,

Thank you very much for your help, but this doesn't seem to be working. How do I get to the workbook level routine?
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 7, 2010 at 05:00 PM
By Workbook level, what I meant to say was that it is an workbook event, IF you goto VBE, you would have to enter this in ThisWorkbook
0