Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Problem w/ Print Macro

Sorry I missed the
..printout

What part is not working... Are your events enabled. If at any point during
debuggin you stopped the code prior to

Application.EnableEvents = True

Then your events are not firing...
--
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

The line
Cancel = True

Cancels the print job. it does not sound like that is your intention. Try
removing that line...
--
HTH...

Jim Thomlinson


"dgold82" wrote:

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

Reply
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
Macro Print Range Problem - Rows Cut Off (Upgraded From Excel 2003 to2007) ac1179 Excel Programming 1 February 3rd 09 08:28 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 01:58 PM.

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

About Us

"It's about Microsoft Excel"