Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a form template I have designed that will be printed occasionally to
fill in manually. I created some option buttons for this form and want it to open every time with neither option chosen. I assume that if someone plays with this and saves it as a template then this feature may get messed with (users can do the darndest things). So I thought I would like a macro that would check each option button upon opening and uncheck it. I have done a lot of macro work in Access but not much in Excel. I tried Private Sub Workbook_Open() OptionButton59.Value = False OptionButton60.Value = False End Sub But that did not work. It still opened with to Option 59 selected. Any help would be greatly appreciated. Thanks, Ken Ivins |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ken,
I've made some assumptions... No VBA Form is being used. Using option buttons from the "Forms" toolbar Buttons are placed directly on a worksheet Option buttons are designed to work as a group so that only one at time has a value of true. You can have independent groups of option buttons but they have to be separated using a Frame - also from the "Forms" toolbar. Check boxes are not tied together and all or none can be true or false. In any case, the following will work if Excel doesn't crash... Worksheets("SheetName").Select ActiveSheet.Shapes("Option Button 59").ControlFormat.Value = False ActiveSheet.Shapes("Option Button 60").ControlFormat.Value = False Regards, Jim Cone San Francisco, CA ----- Original Message ----- From: "Ken Ivins" Newsgroups: microsoft.public.excel.programming Sent: Monday, September 20, 2004 8:02 AM Subject: Option Button open template false I have a form template I have designed that will be printed occasionally to fill in manually. I created some option buttons for this form and want it to open every time with neither option chosen. I assume that if someone plays with this and saves it as a template then this feature may get messed with (users can do the darndest things). So I thought I would like a macro that would check each option button upon opening and uncheck it. I have done a lot of macro work in Access but not much in Excel. I tried Private Sub Workbook_Open() OptionButton59.Value = False OptionButton60.Value = False End Sub But that did not work. It still opened with to Option 59 selected. Any help would be greatly appreciated. Thanks, Ken Ivins |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check box - true/false - i'd like a third option n/a | Excel Discussion (Misc queries) | |||
Assign different macros for True/False button | Excel Discussion (Misc queries) | |||
TRUE/FALSE MACRO using Option Buttons | Excel Discussion (Misc queries) | |||
keep source formatting is not an option in paste option button | Excel Discussion (Misc queries) | |||
New button does not open the template workbook set up | Excel Discussion (Misc queries) |