Recalc & conditional formatting

S

swas

Hello,

I have a form with conditional formatting on several controls, including
setting enabled and back colour properties.

My problem is, the formatting is v e r y slow sometimes to react to changes
(10 - 20 seconds sometimes). Because some vary the enabled state, controls
can't be edited.

Using .recalc solves this problem, but because the formatting is based on
cell values, and recalc causes a form update, all my beforeupdate and
afterupdate events are firing at the wrong times!

Can controls conditional formatting be forced to update without recalc?


Thanks in advance.


swas
 
J

John W. Vinson

Hello,

I have a form with conditional formatting on several controls, including
setting enabled and back colour properties.

My problem is, the formatting is v e r y slow sometimes to react to changes
(10 - 20 seconds sometimes). Because some vary the enabled state, controls
can't be edited.

Using .recalc solves this problem, but because the formatting is based on
cell values, and recalc causes a form update, all my beforeupdate and
afterupdate events are firing at the wrong times!

Can controls conditional formatting be forced to update without recalc?

I haven't run into this particular issue, but at a guess, I'd try Repaint
rather than Recalc.
 
S

swas

Thanks for the comment John.

I have tried repaint, but unfortunately doesn't fire up conditional
formatting.

I think I will just write a subroutine that hard sets the back colour /
enabled settings directly. I can call this at will.


Thanks again.


swas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top