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


hello

I have a sheet with a drop down box and some options buttons
the opitions buttons are in group of 2 (yes / no options)

I also have a command button that clears the cells and return you to
the main page but i want to reset the options buttons to no but every
time i try i get a dug error i have try to record one will stop no joy

Code
Range("D9").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=60
Range("C87").Select
ActiveCell.FormulaR1C1 = "1"
Range("C88").Select
ActiveWindow.SmallScroll Down:=-60
Range("D9").Select
OptionButton10.Value = True
OptionButton4.Value = True
OptionButton6.Value = True
Sheets("mainpage").Select

the option buttons are from the control toolbox

Help
Thanks


--
Rmagic
------------------------------------------------------------------------
Rmagic's Profile: http://www.excelforum.com/member.php...o&userid=28595
View this thread: http://www.excelforum.com/showthread...hreadid=485714

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default resetting options buttons

Try this code

Application.EnableEvents = False
Range("D9").ClearContents
Range("C87").FormulaR1C1 = "1"
ActiveSheet.OLEObjects("OptionButton10").Object.Va lue = True
ActiveSheet.OLEObjects("OptionButton4").Object.Val ue = True
ActiveSheet.OLEObjects("OptionButton6").Object.Val ue = True
Sheets("mainpage").Select
Application.EnableEvents = True


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rmagic" wrote in
message ...

hello

I have a sheet with a drop down box and some options buttons
the opitions buttons are in group of 2 (yes / no options)

I also have a command button that clears the cells and return you to
the main page but i want to reset the options buttons to no but every
time i try i get a dug error i have try to record one will stop no joy

Code
Range("D9").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=60
Range("C87").Select
ActiveCell.FormulaR1C1 = "1"
Range("C88").Select
ActiveWindow.SmallScroll Down:=-60
Range("D9").Select
OptionButton10.Value = True
OptionButton4.Value = True
OptionButton6.Value = True
Sheets("mainpage").Select

the option buttons are from the control toolbox

Help
Thanks


--
Rmagic
------------------------------------------------------------------------
Rmagic's Profile:

http://www.excelforum.com/member.php...o&userid=28595
View this thread: http://www.excelforum.com/showthread...hreadid=485714



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
Selecting 3 buttons out of a 3 x 3 array of options. Tayo Excel Discussion (Misc queries) 1 February 20th 09 12:53 AM
Options of the buttons F1, F2, F4,F5 .... dont'work Daniel Utsch[_2_] Excel Discussion (Misc queries) 2 February 4th 09 01:18 PM
Why are my options resetting themselves? cbare Excel Discussion (Misc queries) 0 November 2nd 06 11:30 PM
Resetting Buttons in Macro [email protected] New Users to Excel 0 October 18th 06 11:38 AM
resetting custom buttons for macro mtarggart Excel Programming 3 March 28th 05 08:21 PM


All times are GMT +1. The time now is 06:39 PM.

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

About Us

"It's about Microsoft Excel"