+ Reply to Thread
Results 1 to 2 of 2

Disable a Form Control

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Perth
    MS-Off Ver
    2013
    Posts
    33

    Disable a Form Control

    Hi all,

    I'm having all kinds of fun creating a worksheet which collects a bunch of data (sort of like a survey) from the user, and then rates the inputs based on pre-determined variables.

    I'm trying to make the form user friendly by hiding "questions" until they are relevant, either because it is applicable, or because it has been made applicable due to a previous input. So far I have had some success with hiding rows and form controls (checkboxes and comboboxes), but the nature of the sheet means that some times the layout I create is messed up when the controls are hidden and I exit Excel.

    Taking a different tact, I thought that instead of hiding the rows / form controls, what if I greyed/disabled/locked them out until they became applicable. This way, the layout doesn't change through row height being adjusted and therefore the integrity of the worksheet should remain once I save and exit.

    My question is therefore, how do I disable a combobox / checkbox and fade it to the background such as would be commonly seen on other applications / websites, using VBA? I would like an input via a combobox or checkbox (extra to those that have been disabled) to make this happen.

    EDIT: I should say that the project is quite large, and I have been using Form Controls over ActiveX Controls because I'm a noob. I gather that this means the ComboBox1.Disable = true is not an option. Hopefully this doesnt preclude my efforts, as I'd prefer to move to ActiveX next project :D

    Thanks for your help,
    Last edited by SonOfOdin; 07-10-2012 at 04:26 AM.
    Kind Regards

    - Justin

  2. #2
    Registered User
    Join Date
    06-20-2012
    Location
    Perth
    MS-Off Ver
    2013
    Posts
    33

    Re: Disable a Form Control

    I think I have partly answered my own question here, in that my edit wasn't entirely correct; it was a matter of syntax.

    http://www.excelforum.com/excel-prog...down-list.html

    However, using the activesheet.DropDowns("Drop Down 1").Enabled = True / False statement doesn't grey the control for me; the result being a form control which still looks like an option to be completed. I don't know as yet whether there is an analog statement for the Checkbox...

    My question is then, how do I change the Form Control to a lower contrasting colour?

    Thanks again,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1