Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default option buttons

Hi,

I need some help on option buttons and tick boxes that I have on an Excel
worksheet. I have a button which I would like to run a macro which will
'refresh' the form so that any selections made are unselected but i can't
figure out how to do this option boxes and tick boxes. Can anyone please
help?

Gina
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default option buttons

Forms toolbar controls or Control Toolbox Toolbar controls?

for the latter

for each obj in Activesheet.OleObjects
if typeof obj.Object is MSforms.OptionButton or _
typeof obj.Object is MSforms.Checkbox then
obj.Object.Value = False
end if
Next


for forms controls

Sub ABCDEF()
Dim cbx As CheckBox, obtn As OptionButton
For Each cbx In ActiveSheet.CheckBoxes
cbx.Value = xlOff
Next
For Each obtn In ActiveSheet.OptionButtons
obtn.Value = xlOff
Next
End Sub

--
Regards,
Tom Ogilvy

"Gina" wrote:

Hi,

I need some help on option buttons and tick boxes that I have on an Excel
worksheet. I have a button which I would like to run a macro which will
'refresh' the form so that any selections made are unselected but i can't
figure out how to do this option boxes and tick boxes. Can anyone please
help?

Gina

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
Option buttons: How to get the selected option from a group? naddad Excel Programming 5 December 21st 05 05:09 PM
Navigating between option buttons is not selecting the option drhalter Excel Programming 1 June 3rd 05 02:28 PM
Navigating between option buttons is not selecting the option Gixxer_J_97[_2_] Excel Programming 4 June 2nd 05 02:50 PM
Option Buttons Patrick Simonds Excel Programming 4 January 20th 05 04:55 AM


All times are GMT +1. The time now is 05:47 PM.

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"