Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error in code | Excel Discussion (Misc queries) | |||
Code error ?? | Excel Discussion (Misc queries) | |||
How can I still go to the error-code after a On Error Goto? | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming | |||
More to Error in code | Excel Programming |