View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ABS ABS is offline
external usenet poster
 
Posts: 6
Default VBE tricky question

The controls i add are labels and checkboxes.
So far it works fine, but i want to add programatically some code for
the checkboxes when clicking on a checkbox (change event) that
depending on the TRUE / FALSE condition *a routine is executed. And
here it fails.

Ludo,
Seems to me I recall having to do something similar and I found that
when I got to that True/False condition I got the same kind of
errors. Makes sense cause you're trying to refer to objects that
don't exist yet. I solved by creating all the objects I would need,
then messing around with the Visible property. So, if condition is
True then controls & labels 1 thru 4 visible, if False, controls &
labels 5 thru 8 visible. Wise to always declare one set visible and
the other one invisible otherwise you can get a mess and not know
why. Or declare them all invisible until your True/False sets one
group to visible.
Yeah, you can do it.
ABS