LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Problem w/ Print Macro

I have 2 macros one for showing the print dialog (connected to a clipart
image of a printer) and the other to white out certain cells before print so
that they don't show. For some reason the print macro no longer works now
that I put in the before print macro. Any ideas? Fix? Here is my code below:

(I am running excel 2003, code below is in "thisworkbook")

Sub PrintSheet()
Application.Dialogs(xlDialogPrint).Show
End Sub

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "sheet1" Then
Cancel = True
Application.EnableEvents = False
Application.ScreenUpdating = False
With ActiveSheet
.Range("C4").Font.ColorIndex = 2
.PrintOut
.Range("C4").Font.ColorIndex = 1
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem w/ Print Macro dgold82 Excel Programming 0 June 18th 09 06:15 PM
Problem w/ Print Macro Jim Thomlinson Excel Programming 0 June 18th 09 05:49 PM
Print preview from macro problem Tim G Excel Programming 2 January 16th 09 11:36 PM
Print Macro Problem access user Excel Programming 4 March 19th 08 02:01 PM
Print Macro Problem Graham Haughs Excel Discussion (Misc queries) 2 March 2nd 06 02:40 PM


All times are GMT +1. The time now is 10:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"