Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Error in my code?

I am getting an "Object required" Error when I run this code. I want the colorindex of these cells to change before it prints. Is there another way to have this code work? Can I not reference an object on the spreadsheet in the This Workbook section? Thanks in advance. Matt

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.BlackAndWhite = True
If cbExempt.Value = True Then
Range("C31,E31,G31,I31,K31,M31,O31").Font.ColorInd ex = 2
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
error in code des-sa[_2_] Excel Discussion (Misc queries) 5 July 3rd 08 08:09 AM
Code error ?? Anthony Excel Discussion (Misc queries) 2 February 9th 05 10:31 PM
How can I still go to the error-code after a On Error Goto? Michel[_3_] Excel Programming 2 May 4th 04 04:21 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
More to Error in code Julie Excel Programming 4 November 4th 03 06:10 PM


All times are GMT +1. The time now is 12:31 AM.

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"