Microsoft Office Tutorials and References
In Depth Information
Try It
ActiveSheet.PrintOut ‘demo with PrintPreview
‘Restore the General format to the confidential range
‘so the cells will be able to show their contents
‘after the print job.
Range(“B5:D12”).NumberFormat = “General”
‘Enable events again, now that the print job has been executed.
Application.EnableEvents = True
End Sub
16.
Press Alt+Q to return to the worksheet. Test the code by printing Sheet3, noting that the
printout will show an empty range of cells, representing the range of confidential data that
did not get printed.
To view the video that accompanies this lesson, please select Lesson 12, available
at the following website: www.wrox.com/go/excelvba .
Search JabSto ::




Custom Search