Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007
    Posts
    74

    Unanswered: Disabling a Label with a Checkbox

    Forgive me if this is a stoopid question:

    I have a form that enables/disables many controls depending on the state of other controls on the form.

    I have a ton of checkboxes on the form that are enabled/disabled in this manner. The checkboxes are arranged in an array-style format.

    There are labels on the each of the rows & columns of the checkboxes. I want to be able to enable/disable the row & column labels when the checkboxes are affected.

    At first, I thought I found an easy solution. I associated one of the row/column labels with a specific checkbox in the array. When I disabled the checkbox, the label became disabled as well. For a while, I thought everything was just fine ...

    However, I just realized that If I click on the row/column labels now, a checkbox will get set as a result. This is very undesirable.

    Is there an easy way to actively disable a label without associating it to a checkbox? There doesn't seem to be a '.Enabled' property available for labels.

    Thanks!

    AzJazz
    AzJazz

    "I'm afraid the holodeck will be society's last invention." - Scott Adams

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Rather than using a label, use a text box, set it's ControlSource to ="My Label Text". When you want to disable the "label", you can set this text box to .Enabled=False, and it will be greyed out just as though it was a label attached to a CheckBox.

  3. #3
    Join Date
    May 2007
    Posts
    74
    Thanks for the suggestion, GolferGuy - That worked great!

    AzJazz
    AzJazz

    "I'm afraid the holodeck will be society's last invention." - Scott Adams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •