PDA

View Full Version : Solved: Forcing Conditional Formatting to Check Cell's value



malik641
04-25-2007, 08:20 AM
Hey all,

When updating a Cell (using VBA) that has conditional formatting, the cell's value will change, but the conditional formatting will not change its look (for me, interior color). The conditional formatting I am using is "Formula Is". Is there a way to force the conditional formatting to check the cell's value?

Thanks

Ken Puls
04-25-2007, 09:12 AM
Hi Joseph,

I tried to reproduce this, and got the same issue you had. For grins, I the forced the app to recalc. After that it's stopped being an issue for me. (Kind of weird, actually.)

I was going to suggest that you just recalc the sheet after you apply your values though:
activesheet.Calculate

malik641
04-25-2007, 10:22 AM
Thanks for the suggestion, Ken. But unfortunately, no luck.

If I manually type in the value that changes the cell's color, it changes. Also, it uses a List data validation...and if I select the correct item from the list drop down, it changes the cell's color. Yet, forcing a recalc (either Application or ActiveSheet) doesn't change anything.

malik641
04-25-2007, 10:26 AM
Nevermind. I'm a dope. In the code, I was putting in "Complete" for the cell's value instead of "Completed" :doh: :doh: :doh:

Now that I think about it, I don't know how you could "replicate" my "problem"???

Anyway, I'm marking it solved :)

Thanks Ken!

Ken Puls
04-25-2007, 10:28 AM
Okay, see now this is weird...

I previously tested in Excel 2007. I can't repro the effect I had earlier. Now it just works.

This time I went back to Excel 2003 and tried it. Works as it should. For reference:
My CF (applies a red background) --> =A1=1
Code used to trigger:
activesheet.range("A1").value = 1

Works like a peach. I don't know what to tell you here...

Ken Puls
04-25-2007, 10:31 AM
Beat me too it!


Nevermind. I'm a dope. In the code, I was putting in "Complete" for the cell's value instead of "Completed" :doh: :doh: :doh:

You know... I was going to ask, but I thought you'd be offended if I suggested it was a PEBKAC issue. :devil2:


Now that I think about it, I don't know how you could "replicate" my "problem"???

My either. Possibly I was running in manual mode accidentally... I've been experimenting with a few things, so may have flipped something.

malik641
04-25-2007, 10:36 AM
You know... I was going to ask, but I thought you'd be offended if I suggested it was a PEBKAC issue. :devil2::giggle Don't worry. Next time, if you trully feel that way, say so :)


My either. Possibly I was running in manual mode accidentally... I've been experimenting with a few things, so may have flipped something.
I see. Oh well. Issue resolved, right? Whoo-hoo!! :thumb

lucas
04-25-2007, 10:41 AM
Can't spell but he's good at math.....
I finally found the acronym to describe most my problems:

Problem Exists Between Keyboard And Chair

malik641
04-25-2007, 10:45 AM
Can't spell but he's good at math.....
Yes, I am good at math :goofball:
And I forgot how to spell "truly" :rolleyes:

Didn't we have a spell checker next to Submit Reply and Preview Post?

Ken Puls
04-25-2007, 11:01 AM
LOL!

Bob Phillips
04-25-2007, 02:56 PM
Yes, I am good at math :goofball:
And I forgot how to spell "truly" :rolleyes:

Didn't we have a spell checker next to Submit Reply and Preview Post? Its an icon at the top of the box, ABC and a tick.

malik641
04-25-2007, 03:33 PM
Thank you Bob. I'm usually not looking over there :rolleyes: