goblin
Active Member
- Joined
- Apr 16, 2003
- Messages
- 469
I'm trying to stop Excel from printing textboxes that contain only guidelines on how to use a workbook. Stopping Excel from printing is easy enough by turning of textbox visibility. My problem is turning on visibility again after printing. So far I have the code below (placed in the ThisWorkbook module). Now I need to know if some event fires AFTER printing so that I can turn visibility on again.
Can anyone help? Or point out another way to do this?
Code:
Sub TextBoxPrint(onOff As MsoTriState)
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
If sh.Type = msoTextBox Then
sh.Visible = onOff
End If
Next
End Sub
Private Sub Workbook_BeforePrint(Cancel As Boolean)
TextBoxPrint msoFalse
End Sub
Can anyone help? Or point out another way to do this?