Hello,
I think you'll find that the WorkbookBeforePrint is the event you should use in order to fire a macro when a user attempts to print a worksheet. Try something like this:-
Open the VB editor, double click on the ThisWorkbook icon and enter some code like this:-
Private Sub Workbook_BeforePrint(Cancel As Boolean)
'Enter your conditional formatting code here.
End Sub
Hope this helps,
Dax.
Hi Steve
What you need is your code placed with the Private module of "ThisWorkbook". The quickest way to get there is to right click on the sheet picture, top left next to "File" and select "View Code"
Private Sub Workbook_BeforePrint(Cancel As Boolean)
'Your Code Here
End Sub
Dave
OzGrid Business Applications
Thanks for the help on placing the Beforeprint event in this workbook module.That works great. I have written code designed to reformat a range and then I want it to print and following printing I want to change the format back to its default. The trick I am looking for is how to accomplish this with one subroutine initially autoactivated by file\print so that printing is carried out before the format goes back to default. Thanks so much.
Steve Lincoln