Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deselect Command Button by Selecting another Command Button
Hi,
I am attempting to automaticlly deselect a focused comand button when another command button is selected in Excel. I have tried using the following code: Private Sub booOVERREAD_Click() If booOVERREAD = True Then booUNDERREAD = False End If I am a relative novice when it comes to VBA so any help would be gratefully received. I thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deselect Command Button by Selecting another Command Button
Unless I am missing something in your question, you don't need any code to
do that... only one command button at a time will have focus... selecting a different command button should automatically deselect the previously selected one. -- Rick (MVP - Excel) "gmcnaugh" wrote in message ... Hi, I am attempting to automaticlly deselect a focused comand button when another command button is selected in Excel. I have tried using the following code: Private Sub booOVERREAD_Click() If booOVERREAD = True Then booUNDERREAD = False End If I am a relative novice when it comes to VBA so any help would be gratefully received. I thank you. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deselect Command Button by Selecting another Command Button
On Sep 1, 5:36*pm, "Rick Rothstein"
wrote: Unless I am missing something in your question, you don't need any code to do that... only one command button at a time will have focus... selecting a different command button should automatically deselect the previously selected one. -- Rick (MVP - Excel) "gmcnaugh" wrote in message ... Hi, I am attempting to automaticlly deselect a focused comand button when another command button is selected in Excel. *I have tried using the following code: Private Sub booOVERREAD_Click() If booOVERREAD = True Then * * booUNDERREAD = False End If I am a relative novice when it comes to VBA so any help would be gratefully received. I thank you.- Hide quoted text - - Show quoted text - Hi Rick, Thanks for the reply. It may help if I tell you that these buttons when pushed generate a code and text representing the code. E.g. the buttons which I previously showed code for generate the code letters A & R respectively along with the text "Over Read" and "Under Read". I am trying to achieve the functionality of a radio button I suppose, in that if say the "Over Read" button is pressed the relevant letter and text will show, however, if the "Under Read" button is pressed after the "Over Read" then the "Under Read" text and letter are removed and replaced with the "Over Read" text and letter. The reason for the command buttons and not radios is that the Human Input Device will be a touchscreen operated by personnel using gloves. I have found that radio buttons are too small when using the touch screen whilst command buttons are far more adaptable. If you think bar til then that is what I am trying to achieve! I hope this clarifys my end goal. Thank you. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deselect Command Button by Selecting another Command Button
On Sep 2, 8:29*am, gmcnaugh wrote:
On Sep 1, 5:36*pm, "Rick Rothstein" wrote: Unless I am missing something in your question, you don't need any code to do that... only one command button at a time will have focus... selecting a different command button should automatically deselect the previously selected one. -- Rick (MVP - Excel) "gmcnaugh" wrote in message .... Hi, I am attempting to automaticlly deselect a focused comand button when another command button is selected in Excel. *I have tried using the following code: Private Sub booOVERREAD_Click() If booOVERREAD = True Then * * booUNDERREAD = False End If I am a relative novice when it comes to VBA so any help would be gratefully received. I thank you.- Hide quoted text - - Show quoted text - Hi Rick, Thanks for the reply. It may help if I tell you that these buttons when pushed generate a code and text representing the code. E.g. the buttons which I previously showed code for generate the code letters A & R respectively along with the text "Over Read" and "Under Read". I am trying to achieve the functionality of a radio button I suppose, in that if say the "Over Read" button is pressed the relevant letter and text will show, however, if the "Under Read" button is pressed after the "Over Read" then the "Under Read" text and letter are removed and replaced with the "Over Read" text and letter. The reason for the command buttons and not radios is that the Human Input Device will be a touchscreen operated by personnel using gloves. *I have found that radio buttons are too small when using the touch screen whilst command buttons are far more adaptable. *If you think bar til then that is what I am trying to achieve! I hope this clarifys my end goal. Thank you.- Hide quoted text - - Show quoted text - Hi again Rick. I have now managed to work this out for myself. Thank you for taking the time to reply anyway. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wanting to Create A Command Button Command | Excel Programming | |||
VB's Command Button vs Form's Command Button | Excel Programming | |||
Command Button to be used as Browse... for selecting a file to be used... | Excel Programming | |||
Command Button vs Control Button | Excel Programming | |||
Command Button vs Form Button | Excel Programming |