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

i have a quick excel question that involves macro.

basically, what i need to do is this.

i have option buttons and when one out of three buttons is clicked, it
needs to put the value "1" in the cell right behind the selected
option button and "0" into each cell behind other option buttons.

do you have any suggestions for the macro?


much thanks in advance,

hyejin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default option butten

How about using a linked cell and a few formulas:

I put a groupbox from the Forms toolbar on a worksheet.
I put 3 optionbuttons from the forms toolbar inside that groupbox.

Then I assigned the linked cell (to the first optionbutton) to an out of the way
location (A1 in my sample).

Then I put:
=--(a1=1)
behind the first optionbutton

=--(a1=2)
behind the second

and
=--(a1=3)
behind the third.

(a1=1) returns true or false
--(true or false) becomes 1 or 0.

====
But maybe just looking at the linked cell would be easier???????


wrote:

i have a quick excel question that involves macro.

basically, what i need to do is this.

i have option buttons and when one out of three buttons is clicked, it
needs to put the value "1" in the cell right behind the selected
option button and "0" into each cell behind other option buttons.

do you have any suggestions for the macro?

much thanks in advance,

hyejin


--

Dave Peterson
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
Dont have secondary axis option listed in Series Option Venus Charts and Charting in Excel 3 February 23rd 10 07:30 PM
preserve formatting option in pivot table option dialog box Dave F Excel Discussion (Misc queries) 4 May 8th 08 07:25 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
how do I make a routine run after the 'cancel' butten is pressed . Dave Excel Programming 13 January 10th 05 05:40 PM
Option Commands (Option Explicit / Option Base etc) - Scope Alan Excel Programming 8 November 1st 04 02:22 AM


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