Conditional formatting - Help!

L

Lee

I cut and pasted the controls from a form to a tab control
(on the same form). Now I'm having problems with the
conditional formatting that was working before. In code,
the click event for a checkbox, if it is true I set the
following:

ControlName.FormatConditions(0).Enabled = True
ControlName.SetFocus

Where ControlName is a textbox that I want to enable for
user entry. The error is on the SetFocus. When I check
the ControlName.FormatConditions(0).Enabled it returns
False. I then try to perform the
ControlName.FormatConditions(0).Enabled = True statement
again and now it returns true and the SetFocus works while
I'm stepping thru the code. I've tried DoEvents between
the two statements to no avail. I put a loop for 5-10
seconds between statements and that didn't work either.
Anybody got and idea as to what's going on here?
Thanks in advance!
 

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