+ Reply to Thread
Results 1 to 4 of 4

Deactivate option button and cell

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    35

    Deactivate option button and cell

    Hi friends,

    What I need to do is,
    - If fruits is selected in question 1,
    then automatically OptionButton3, OptionButton4 & OptionButton5 should get activated
    and OptionButton6, OptionButton7 and cell E9 should get deactivated (means user should be restricted to use them).
    - if vegetables is selected in qusetion1 ,
    then automatically OptionButton6, OptionButton7 and cell E9 should get activated
    and OptionButton3, OptionButton4 & OptionButton5 should get deactivated

    I have used activeX option buttons as that is the requirement from my boss.
    I tried to use If-Then-Else but its not working .

    Sample file
    Option button deactivation.xlsm

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Deactivate option button and cell

    Hi,

    In the workbook module, I used this code:
    Please Login or Register  to view this content.
    In the worksheet module, I used this code:
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Registered User
    Join Date
    06-18-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Deactivate option button and cell

    Thanks ajryan88. you helped me to solve my problem

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Deactivate option button and cell

    No problems.

    Please don't forget to click on the * next to my post to say thanks

+ 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. [SOLVED] How to deactivate selection in Macro button
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2013, 03:29 PM
  2. cell as option button
    By xenon_aniki in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2009, 02:52 AM
  3. activate or deactivate a cell based on the option selected in validation list
    By techfutura in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-15-2008, 06:55 AM
  4. Deactivate X (Close button) when using FileDialog
    By Fredriksson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2007, 07:18 PM
  5. activate/deactivate button with macro at given condition
    By arcq in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2005, 02:06 AM

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