+ Reply to Thread
Results 1 to 5 of 5

Radio Button reference cell issue

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Radio Button reference cell issue

    Hi,

    Please see the attached file.
    I tried to create a radio button in D16 with reference cell to O16, but when button is inserted it automatically refers to cell O15. If I change it to O16 the buttons in D15 also gets automatically changed to O16. I have been struggling to create radio buttons with respective O reference cells for the remaining rows also. Please help me by indicating what I am doing wrong here.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Radio Button reference cell issue

    It's always a fuzz with these controls on worksheet.
    Here's a working alternative.
    Uses some simple conditional formatting and the worksheet's Selection_Change event (see codemodule of the sheet).
    Attached Files Attached Files
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: Radio Button reference cell issue

    Thank you so much. It is 99% perfect.
    Could you please help me by changing the code so that it should work only if I click using mouse on the buttons? Currently, the option gets selected even if I use the left or right arrow keyboard button to move over radio buttons. Please help me.

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Radio Button reference cell issue

    The attached version allows for selecting options only by mouse-click.

    To prevent the user from entering the Options Area (F12:J24) with the arrow keys the Options Area is surrounded by "NoGo Areas" (top, left, bottom, right).
    When entering (=selecting) a cell in a NoGo Area the cursor will be bounced back.
    The header of the Options Area is included in the Top NoGo Area so also these cells cannot be selected.
    The row and column sizes of the NoGo Areas are set very small to allow them to be still selected.
    They cannot be hidden, becaause cells in hidden rows or columns cannot be selected by the user (only vba can) and so the Selection_Change event would not be triggered.

    When an option is selected the cursor is moved to [A1] which is hidden.
    Also assigned names to the areas for easier reference.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: Radio Button reference cell issue

    Thank you so much. It works great.

+ 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. I need to delete a cell value with VBA in excel with radio button
    By hrdpgajjar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2018, 10:59 AM
  2. Radio Button to toggle YES or NO based on a cell value
    By egrospe17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2016, 11:22 PM
  3. [SOLVED] Radio Button Output for Cell Selection
    By dblcrona in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2014, 10:58 AM
  4. Macro/Command button - cell reference issue?
    By mhblake in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2012, 02:41 PM
  5. Pressing one radio button to select another radio button
    By raehippychick in forum Excel General
    Replies: 1
    Last Post: 09-13-2007, 11:30 PM
  6. Radio Button to discount value in cell
    By robhargreaves in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2007, 04:10 PM
  7. [SOLVED] How do I insert radio button to sum a cell when clicked
    By Joe D. in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-06-2006, 05:00 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