View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
gmcnaugh[_2_] gmcnaugh[_2_] is offline
external usenet poster
 
Posts: 3
Default 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.