Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
I have a number of control groups on a worsheet with radio buttons in them.
If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
Any takers on this one? It would be helpful especially since I will be
disabling right-click for user of this spreadsheet. Thanks. "dgold82" wrote: I have a number of control groups on a worksheet with radio buttons in them. If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
I'm guessing that you have a linked cell for that optionbutton and that linked
cell is locked. If you unlock that cell, do things work ok? If you have to have that cell locked, then instead of using it as the linked cell, you could link to a different cell (on a different (hidden) worksheet) and then use a formula to retrieve that value. If this doesn't help, what type of optionbutton did you use--from the forms toolbar or from the control toolbox toolbar. dgold82 wrote: I have a number of control groups on a worsheet with radio buttons in them. If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
Thanks for responding Dave. The linked cell is actually unlocked and hidden.
My users wouldn't be able to click a radio button if the linked cell was locked. My problem is that my users need to have some of the radio buttons unclicked and if they accidentally click one they can't clear it (except by clicking on reset all which was a command button that I made). They need to be able to clear a radio button with having to rightclick. Clicking on it again and having it clear would be the best since rightclicking is disabled. Any code available that you know of? "Dave Peterson" wrote: I'm guessing that you have a linked cell for that optionbutton and that linked cell is locked. If you unlock that cell, do things work ok? If you have to have that cell locked, then instead of using it as the linked cell, you could link to a different cell (on a different (hidden) worksheet) and then use a formula to retrieve that value. If this doesn't help, what type of optionbutton did you use--from the forms toolbar or from the control toolbox toolbar. dgold82 wrote: I have a number of control groups on a worsheet with radio buttons in them. If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
It kind of sounds like you're using optionbuttons in place of checkboxes--just
as an indicator to choose something or not. If that's the case, I'd replace the optionbuttons with checkboxes. But if you wanted to keep the optionbuttons, then give the users another option. Yes AND no (for each group). dgold82 wrote: Thanks for responding Dave. The linked cell is actually unlocked and hidden. My users wouldn't be able to click a radio button if the linked cell was locked. My problem is that my users need to have some of the radio buttons unclicked and if they accidentally click one they can't clear it (except by clicking on reset all which was a command button that I made). They need to be able to clear a radio button with having to rightclick. Clicking on it again and having it clear would be the best since rightclicking is disabled. Any code available that you know of? "Dave Peterson" wrote: I'm guessing that you have a linked cell for that optionbutton and that linked cell is locked. If you unlock that cell, do things work ok? If you have to have that cell locked, then instead of using it as the linked cell, you could link to a different cell (on a different (hidden) worksheet) and then use a formula to retrieve that value. If this doesn't help, what type of optionbutton did you use--from the forms toolbar or from the control toolbox toolbar. dgold82 wrote: I have a number of control groups on a worsheet with radio buttons in them. If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. -- Dave Peterson -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
So I guess you are saying that there is no way to clear a radio button
without right clicking or resetting them all? I have it set up with radio buttons because I am mimicking a scantron test for students to use. I would use checkboxes but they don't look like the real thing. This is how it looks for about 200 questions: 1. ( ) A ( ) B ( ) C ( ) D 2. ( ) F ( ) G ( ) H ( ) J 3. ( ) A ( ) B ( ) C ( ) D etc I don't want to add anything (if possible) to the format of the input for simplicity purposes. Thank you for the suggestions though. Hopefully I'll figure out how to code my way out of this. "Dave Peterson" wrote: It kind of sounds like you're using optionbuttons in place of checkboxes--just as an indicator to choose something or not. If that's the case, I'd replace the optionbuttons with checkboxes. But if you wanted to keep the optionbuttons, then give the users another option. Yes AND no (for each group). dgold82 wrote: Thanks for responding Dave. The linked cell is actually unlocked and hidden. My users wouldn't be able to click a radio button if the linked cell was locked. My problem is that my users need to have some of the radio buttons unclicked and if they accidentally click one they can't clear it (except by clicking on reset all which was a command button that I made). They need to be able to clear a radio button with having to rightclick. Clicking on it again and having it clear would be the best since rightclicking is disabled. Any code available that you know of? "Dave Peterson" wrote: I'm guessing that you have a linked cell for that optionbutton and that linked cell is locked. If you unlock that cell, do things work ok? If you have to have that cell locked, then instead of using it as the linked cell, you could link to a different cell (on a different (hidden) worksheet) and then use a formula to retrieve that value. If this doesn't help, what type of optionbutton did you use--from the forms toolbar or from the control toolbox toolbar. dgold82 wrote: I have a number of control groups on a worsheet with radio buttons in them. If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. -- Dave Peterson -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
So you've grouped the optionbuttons A to D, F to J, ....
Can you add a 5th optionbutton to each group for "none of the first 4"??? Or maybe you could provide another button that resets that group so that nothing in that group is selected. Any macro/button would depend on the type of button and optionbutton, too. You didn't share where those optionbuttons (and buttons) came from. dgold82 wrote: So I guess you are saying that there is no way to clear a radio button without right clicking or resetting them all? I have it set up with radio buttons because I am mimicking a scantron test for students to use. I would use checkboxes but they don't look like the real thing. This is how it looks for about 200 questions: 1. ( ) A ( ) B ( ) C ( ) D 2. ( ) F ( ) G ( ) H ( ) J 3. ( ) A ( ) B ( ) C ( ) D etc I don't want to add anything (if possible) to the format of the input for simplicity purposes. Thank you for the suggestions though. Hopefully I'll figure out how to code my way out of this. "Dave Peterson" wrote: It kind of sounds like you're using optionbuttons in place of checkboxes--just as an indicator to choose something or not. If that's the case, I'd replace the optionbuttons with checkboxes. But if you wanted to keep the optionbuttons, then give the users another option. Yes AND no (for each group). dgold82 wrote: Thanks for responding Dave. The linked cell is actually unlocked and hidden. My users wouldn't be able to click a radio button if the linked cell was locked. My problem is that my users need to have some of the radio buttons unclicked and if they accidentally click one they can't clear it (except by clicking on reset all which was a command button that I made). They need to be able to clear a radio button with having to rightclick. Clicking on it again and having it clear would be the best since rightclicking is disabled. Any code available that you know of? "Dave Peterson" wrote: I'm guessing that you have a linked cell for that optionbutton and that linked cell is locked. If you unlock that cell, do things work ok? If you have to have that cell locked, then instead of using it as the linked cell, you could link to a different cell (on a different (hidden) worksheet) and then use a formula to retrieve that value. If this doesn't help, what type of optionbutton did you use--from the forms toolbar or from the control toolbox toolbar. dgold82 wrote: I have a number of control groups on a worsheet with radio buttons in them. If I locked the worksheet is there a way for a user to clear a radio button by just clicking again on it without having to "right click" and click on "clear contents". I'm sure there is a macro out there somewhere. Any help would be appreciated. -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
There might be a way to do it, but I could never find it. I've tried everything I know to do it and that's just not the way OptionButtons work. What I don't understand is, if one of the buttons IS to be selected, why can't they just select another one and that clears the currently selected button (hence the way OptionButtons work)? -- gmorris ------------------------------------------------------------------------ gmorris's Profile: http://www.thecodecage.com/forumz/member.php?userid=245 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=89093 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
Wow, I really appreciate the time you guys are taking to respond.
Unfortunatelly, I don't think you are understanding my previous posts and that can be due to the fact that you aren't sitting here next to me with a full understanding of this project. To answer Dave's questions: 1) a scantron is a sheet that a student fills out with their answers to standardized tests. Like the ACT or SAT or GMAT etc. I want my worksheet to look and feel like the same thing. 2) The command button and my radio buttons are from the "forms control" toolbar not the activex controls. The "reset all" command button is up in a designated area on the top of the worksheet that looks seperate from the actual input. Looks like a toolbar that enables the user to jump around the workbook. 3) Like a stated earlier, I know I could put a button next to the answers that would clear a certain group box of buttons, but that would compromise the look and I just don't want to do that. I'd rather just not have the option for them at all until I figure this out. I think gmorris understands where I am going with this. Looks like there are a lot of people that have tried this to no avail. I just don't understand why the radio buttons don't clear themselves if they are clicked again. I know it would somewhat be like a checkbox...but there would still be some subtle differences. I think my final takaway from this VBA adventure is that I should either just leave right clicking enabled or create a custom right click that only would reset the radio button. Do you guys happen to know how to create a custom right click (since I have disabled the official one using the above VBA)? Thanks again for your time! "gmorris" wrote: There might be a way to do it, but I could never find it. I've tried everything I know to do it and that's just not the way OptionButtons work. What I don't understand is, if one of the buttons IS to be selected, why can't they just select another one and that clears the currently selected button (hence the way OptionButtons work)? -- gmorris ------------------------------------------------------------------------ gmorris's Profile: http://www.thecodecage.com/forumz/member.php?userid=245 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=89093 |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Click to Clear Radio Button
If you're using xl2003, look at:
Tools|Options|View tab Look at how comments can be displayed. tools|Options|International tab Look at right to left section Tools|Options|Calculation tab look at the calculation section You'll see how optionbuttons work. dgold82 wrote: Wow, I really appreciate the time you guys are taking to respond. Unfortunatelly, I don't think you are understanding my previous posts and that can be due to the fact that you aren't sitting here next to me with a full understanding of this project. To answer Dave's questions: 1) a scantron is a sheet that a student fills out with their answers to standardized tests. Like the ACT or SAT or GMAT etc. I want my worksheet to look and feel like the same thing. 2) The command button and my radio buttons are from the "forms control" toolbar not the activex controls. The "reset all" command button is up in a designated area on the top of the worksheet that looks seperate from the actual input. Looks like a toolbar that enables the user to jump around the workbook. 3) Like a stated earlier, I know I could put a button next to the answers that would clear a certain group box of buttons, but that would compromise the look and I just don't want to do that. I'd rather just not have the option for them at all until I figure this out. I think gmorris understands where I am going with this. Looks like there are a lot of people that have tried this to no avail. I just don't understand why the radio buttons don't clear themselves if they are clicked again. I know it would somewhat be like a checkbox...but there would still be some subtle differences. I think my final takaway from this VBA adventure is that I should either just leave right clicking enabled or create a custom right click that only would reset the radio button. Do you guys happen to know how to create a custom right click (since I have disabled the official one using the above VBA)? Thanks again for your time! "gmorris" wrote: There might be a way to do it, but I could never find it. I've tried everything I know to do it and that's just not the way OptionButtons work. What I don't understand is, if one of the buttons IS to be selected, why can't they just select another one and that clears the currently selected button (hence the way OptionButtons work)? -- gmorris ------------------------------------------------------------------------ gmorris's Profile: http://www.thecodecage.com/forumz/member.php?userid=245 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=89093 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
show different areas of sheet with a click radio button | Excel Discussion (Misc queries) | |||
Create a Clear button to clear unprotected cells | Excel Programming | |||
Radio Buttons require double-click | Excel Programming | |||
How do I lock a radio button group if a N/A button is selected | Excel Discussion (Misc queries) | |||
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True | Excel Worksheet Functions |