Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Radio Buttons in VBA UserForms

I have created a userform in VBA which allows the user to input into an excel
spreadsheet with a userfom.

Within the form there are a number of Radio Buttons. When the form is active
and the radio buttons have been selected they can no longer be deselected. I
would like to be able to do this as it is possibe a user could select a user
form by accident.

Can you please help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Radio Buttons in VBA UserForms

Without knowing more about your application, perhaps you can use checkboxes
instead of option buttons.

--

Vasant

"nir020" wrote in message
...
I have created a userform in VBA which allows the user to input into an

excel
spreadsheet with a userfom.

Within the form there are a number of Radio Buttons. When the form is

active
and the radio buttons have been selected they can no longer be deselected.

I
would like to be able to do this as it is possibe a user could select a

user
form by accident.

Can you please help?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Radio Buttons in VBA UserForms

Hi

You could add an extra radio button that says "Other", or one that says
"clear selections".
The "Other" button would need no code. The "Clear Selections" button could
be coded something like this

Userform1.OptionButton1.Value = False
Userform1.OptionButton2.Value = False
Userform1.OptionButton3.Value = False

or assuming your buttons are all within a frame, you could put a command
button in the bottom of the frame that says "Clear Selections" and use the
same code to clear the Radio buttons.

There does not seem to be a simple elegant solution. Maybe someone else has
some ideas.

HTH

Ken


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Radio Buttons in VBA UserForms

Radio buttons are designed to work together within a frame, for when the user
needs to select one of several mutually excluxive choices. Choosing one
deselects any prior choice. If you only have one button, it cannot be
deselected because there is no alternative choice to select. Group the radio
buttons within a frame, or use checkboxes instead.

"nir020" wrote:

I have created a userform in VBA which allows the user to input into an excel
spreadsheet with a userfom.

Within the form there are a number of Radio Buttons. When the form is active
and the radio buttons have been selected they can no longer be deselected. I
would like to be able to do this as it is possibe a user could select a user
form by accident.

Can you please help?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Radio Buttons in VBA UserForms


are you refering to the fact that on the form you have lots fo radio
buttons that when the user presses one does


A) not allow you select other radio buttons


or

B) you want the user to only be able to press one radio button eg your
have a question which is just a yes/no answer you only want them to be
able to choose yes or no and not both.

I can help you out if you help me understand your problem


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=379304



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Radio Buttons in VBA UserForms

No what I have in my userform are a number of yes/no question, however they
all do not have to be answered. What I want to do is that if the users clicks
on one by mistake is for them to be able to rectify that mistake by clicking
on the radio button again, or something similar.

Thanks

Nick

"funkymonkUK" wrote:


are you refering to the fact that on the form you have lots fo radio
buttons that when the user presses one does


A) not allow you select other radio buttons


or

B) you want the user to only be able to press one radio button eg your
have a question which is just a yes/no answer you only want them to be
able to choose yes or no and not both.

I can help you out if you help me understand your problem


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=379304


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
Help - Radio Buttons evo182 Excel Worksheet Functions 0 January 22nd 06 03:02 PM
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True Mcasteel Excel Worksheet Functions 2 October 29th 04 07:06 PM
Radio Button Selection in UserForms Big Chris[_32_] Excel Programming 3 February 5th 04 12:26 PM
UserForms setting radio buttons [email protected] Excel Programming 1 November 1st 03 12:53 AM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"