Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default optionbutton takes two clicks to change value

Hi all,

I have searched the Google archives for an answer to this problem to
no avail:

Using XL2000 SP3 on NT4 SP6 and control toolbox controls:

When I have more than 3 option buttons grouped on a user form and
their control sources assigned to cells on a worksheet it takes two
clicks to change from one option to another. On the first click, all
options go false (along with the corresponding ControlSource cell
values). A second click will set the value of the clicked option to
true (along with its ControlSource cell value). I have been able to
replicate this on a very basic form:

-Insert a userform
-Drop 4 or more option buttons onto it
-Assign all of the options buttons the same group name
-Assign each option button's ControlSource property to a different
worksheet cell

show the form and click between options.

Any insight is appreciated.

Thanks,

-Will
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default optionbutton takes two clicks to change value

Initialize your linked source cells to False. Then show the form (or do it
in the initialize event of the form).

Once the linked source cells are all holding a boolean value, you should not
have a problem.

--
Regards,
Tom Ogilvy

"Will Gardner" wrote in message
om...
Hi all,

I have searched the Google archives for an answer to this problem to
no avail:

Using XL2000 SP3 on NT4 SP6 and control toolbox controls:

When I have more than 3 option buttons grouped on a user form and
their control sources assigned to cells on a worksheet it takes two
clicks to change from one option to another. On the first click, all
options go false (along with the corresponding ControlSource cell
values). A second click will set the value of the clicked option to
true (along with its ControlSource cell value). I have been able to
replicate this on a very basic form:

-Insert a userform
-Drop 4 or more option buttons onto it
-Assign all of the options buttons the same group name
-Assign each option button's ControlSource property to a different
worksheet cell

show the form and click between options.

Any insight is appreciated.

Thanks,

-Will



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default optionbutton takes two clicks to change value

Tom,

Thanks for the advice. Interestingly enough, while it worked just
swell in my test workbook, it did not change anything in the
application I am working on and I am not sure what the fundamental
difference between the two is. I did note that in the test workbook,
all of the values must be initialized to false in order for the
buttons to function properly. If one is initialized to true and
others to false, a double click is necessary to change the selection
the first time. Once it has changed, behavior seems normal.

In my application:

If I show the form and move it to a location so that the linked cells
on the worksheet are visible, I observe the following behavior:

When all options are false, clicking on any option will change its
value to true, run the click event code, and change the appropriate
linked cell value to true. - OK

However....

if option 1 is true and I click on option 2, the following happens:

option 1's value changes to false, the radio button black dot is
cleared, and the linked cell's value is changed to false. option 2's
value is changed to true (msgbox option2.value code in click event),
but the option 2 radio button does not get it's black dot, nor does
the linked cell value on the worksheet change. If I click again on
option 2 (or click on any other option), the appropriate values are
set and the radio buttons are filled/unfilled appropriately.

Putting a Repaint in the click events of the option buttons had no
effect. Putting a Calculate in the click events of the option buttons
effectively negated the effects of any and all clicks (no buttons nor
values would change regardless of what was clicked)

Any suggestions?

Thanks,

-Will
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
Counting clicks rengewwj[_2_] Excel Discussion (Misc queries) 5 December 23rd 08 08:14 PM
Takes too long for Filedialog to change directory File selection in office2003 Excel Discussion (Misc queries) 1 May 1st 06 05:33 AM
OptionButton nrage21[_70_] Excel Programming 0 September 29th 04 12:23 AM
Better Way to Use OptionButton [email protected] Excel Programming 4 September 1st 04 07:04 PM
Save takes seconds vs. SaveAs/Save As takes minutes Andrew H[_3_] Excel Programming 0 August 17th 04 07:17 PM


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