+ Reply to Thread
Results 1 to 4 of 4

enable disable user form option button group

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    78

    enable disable user form option button group

    I have some user form of option buttons that share the same groupname "optGroup". I would like to enable/disable all option button ins "optGroup" by toggling a checkbox. So far, no working code, but rudimentary idea is:

    Please Login or Register  to view this content.
    This doesn't work because optGroup is not a object. So I was wondering is it possible to and how would I reference the the `Enabled` property of each option button in optGroup?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: enable disable user form option button group

    You could put the option buttons in a frame and then disable/enable the frame, and the option buttons.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: enable disable user form option button group

    Please Login or Register  to view this content.
    But you can treat it like one.
    Put this in the user forms code module.
    The button will toggle the enabled status of all the option buttons whose group name is "xx"

    Please Login or Register  to view this content.
    You can also use code like

    Please Login or Register  to view this content.
    If no option button has the .GroupName "xx" then EnableOptionGroup("xx") will return False. and setting the value of EnableOptionGroup("xx") will have no effect.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    09-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: enable disable user form option button group

    I did not realize i could do that, I will use this

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. enable/disable a command button in User Form w/ condition
    By Bidyut Chakraborty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2014, 03:11 AM
  2. [SOLVED] Disable option button on user form??????
    By Bflare in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-27-2014, 04:42 PM
  3. How I do disable and enable web browser control in access form on button click
    By krjoshi in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2013, 02:58 PM
  4. [SOLVED]VBA - Button(Form Control)-Disable/Enable->Alternate Solution
    By mcmunoz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2013, 02:56 AM
  5. How to Enable/Disable the Option Button(s) based on different ComboBox Values?
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2011, 04:32 PM

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