Select Wich Cells To Include In Print
Good Evening All,
Excel 2007. I have a ss (report), in which I have included notes for the user, eg 'click on button to refresh data'. These notes have been placed directly in available cells, (ie are not n a comment). I would like to exclude these note ranges eg D4:F4, (note in D4 but carries over into F4) from appearing in the printed version. Is this possible, or do I have to use a comments box, & then clickon the not to show in print option? Cheers Guys, Mathew |
Select Wich Cells To Include In Print
Let's say that in addition to D4, you also want to hide F6 (for example).
In the VBE, double-click on the Thisworkbook object, post this code: Private Sub Workbook_BeforePrint(Cancel As Boolean) Range("D4,F6").Font.ColorIndex = 2 Application.OnTime Now, "RESTORE" End Sub In a regular module, put this: Sub Restore() Range("D4,F6").Font.ColorIndex = -4105 End Sub HTH "Mathew P Bennett" wrote: Good Evening All, Excel 2007. I have a ss (report), in which I have included notes for the user, eg 'click on button to refresh data'. These notes have been placed directly in available cells, (ie are not n a comment). I would like to exclude these note ranges eg D4:F4, (note in D4 but carries over into F4) from appearing in the printed version. Is this possible, or do I have to use a comments box, & then clickon the not to show in print option? Cheers Guys, Mathew |
Select Wich Cells To Include In Print
Thanks Bob, I thought here would be a VBA solution. I take it, on selecting
print, it changes the font of the selected cells/range to white, and restores to normal, once print is done. Cheers agian. M "Bob Umlas, Excel MVP" wrote in message ... Let's say that in addition to D4, you also want to hide F6 (for example). In the VBE, double-click on the Thisworkbook object, post this code: Private Sub Workbook_BeforePrint(Cancel As Boolean) Range("D4,F6").Font.ColorIndex = 2 Application.OnTime Now, "RESTORE" End Sub In a regular module, put this: Sub Restore() Range("D4,F6").Font.ColorIndex = -4105 End Sub HTH "Mathew P Bennett" wrote: Good Evening All, Excel 2007. I have a ss (report), in which I have included notes for the user, eg 'click on button to refresh data'. These notes have been placed directly in available cells, (ie are not n a comment). I would like to exclude these note ranges eg D4:F4, (note in D4 but carries over into F4) from appearing in the printed version. Is this possible, or do I have to use a comments box, & then clickon the not to show in print option? Cheers Guys, Mathew |
All times are GMT +1. The time now is 10:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com