PDA

View Full Version : Run Command When Push Print Button?



DaTrusHurtz
06-06-2008, 04:56 PM
Hi,

The title pretty much summarizes my question. Is there a way to make excel automatically run a script when the user pushes the print button?

What I'm trying to do is, when someone opens my file and they push the print button, it changes colors of text.

Thanks!

lucas
06-06-2008, 07:10 PM
Put the before print procedure in the thisworkbook module:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
'do your formatting here....
End Sub