Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Control Box Option Buttons

Hey..

I need some help here . . . It's probably something very simple but
dont have the know-how.

How do you clear Option Boxes (the control box type) I know how t
group them by group name -- but once selections have been made, yo
cannot RESET or CLEAR the boxes. I really want to make a Button to ru
a Macro that clears a form.

Any help would be GREATLY appreciated

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Control Box Option Buttons

Hi jlarkin,

I've never tried to do this before, so maybe there's an easier way. But you
can create another OptionButton, make its GroupName the same as the others,
and set its Visible property to False. Then, in the CommandButton's Click
event, you can set the Value of that hidden OptionButton to True. That will
force the others to be False (cleared).

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Hey..

I need some help here . . . It's probably something very simple but I
dont have the know-how.

How do you clear Option Boxes (the control box type) I know how to
group them by group name -- but once selections have been made, you
cannot RESET or CLEAR the boxes. I really want to make a Button to
run a Macro that clears a form.

Any help would be GREATLY appreciated.


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Control Box Option Buttons

Something like

With ActiveSheet
.OptionButton1.Value = False
.OptionButton2.Value = False
.OptionButton3.Value = False
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jlarkin " wrote in message
...
Hey..

I need some help here . . . It's probably something very simple but I
dont have the know-how.

How do you clear Option Boxes (the control box type) I know how to
group them by group name -- but once selections have been made, you
cannot RESET or CLEAR the boxes. I really want to make a Button to run
a Macro that clears a form.

Any help would be GREATLY appreciated.


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Control Box Option Buttons

Jake Marx wrote:
I've never tried to do this before, so maybe there's an easier way.
But you can create another OptionButton, make its GroupName the same
as the others, and set its Visible property to False. Then, in the
CommandButton's Click event, you can set the Value of that hidden
OptionButton to True. That will force the others to be False
(cleared).


Wow, my fault! I swear I tried setting the Values to False, but I must have
missed something. Per Bob's response, you should be able to set the values
to False. Anyway, here's a routine that will "clear" all TextBoxes,
CheckBoxes, and OptionButtons:

Private Sub CommandButton1_Click()
Dim ctl As Control

For Each ctl In Controls
If TypeOf ctl Is msforms.OptionButton Or _
TypeOf ctl Is msforms.CheckBox Then
ctl.Value = False
ElseIf TypeOf ctl Is msforms.TextBox Then
ctl.Object.Text = vbNullString
End If
Next ctl
End Sub

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Control Box Option Buttons

damn man, that worked perfectly... salute!

--
Message posted from http://www.ExcelForum.com

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
Using Multiple sets of Option Buttons (Form Control) In Excell Michael Hudston Excel Worksheet Functions 2 February 26th 09 08:07 AM
Option Buttons, Forms Control, Excel 2007 - 3 options Paula Excel Worksheet Functions 6 February 6th 09 07:36 PM
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
Worksheets and Control Option Buttons KHaydel Excel Worksheet Functions 1 April 9th 07 11:19 PM
How do I create a form in a worksheet with control option buttons. andreah New Users to Excel 2 April 23rd 05 01:12 AM


All times are GMT +1. The time now is 04:28 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"