LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Invalid procedure call trying to use FormatConditions

Hello all,

I'm trying to set the conditional formats for a whole group of cells, but I
keep getting a error.

Error: Run-time error '5': Invalid procedure call or argument.

I can't understand what is causing the error. Below is my code, I hope
someone can help me solve this. No matter how much I look at it, I can't see
the issue. Nothing I've tried has worked.

I don't set the value of the formatting in one shot (using range) because
each row the formula is different. I did try doing it using Range but it
didn't solve the problem.

maxRow = wrk.UsedRange.Rows.Count
For rowNum = 3 To maxRow
For colNum = 50 To 52
strCellFormula = "=($AX$" & rowNum & "=0)"
With wrk.Cells(rowNum, colNum)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Operator:=xlNotEqual,
Formula1:=strCellFormula
.FormatConditions(1).Font.ColorIndex = ZERO_VALUE_CELLS_COLOR_INDEX
End With
Next colNum
Next rowNum

I'd appreciate any help I can get.

Thanks.
--
Disregard, this is so I can find my post later.
***postedbyJay***
 
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
Invalid Procedure Call Or Argument with VBScript [email protected] Excel Programming 0 November 28th 07 01:50 PM
invalid procedure call geebee Excel Programming 1 November 26th 07 04:17 PM
problem with excel invalid procedure call [email protected] Excel Programming 1 October 11th 06 05:42 AM
Invalid procedure call or argument error Patrick Simonds Excel Programming 1 August 12th 06 11:40 PM
Invalid Procedure call or argument T De Villiers[_58_] Excel Programming 1 July 25th 06 03:01 PM


All times are GMT +1. The time now is 06:27 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"