PC Review


Reply
Thread Tools Rate Thread

How to assign different Linked cells to option buttons

 
 
furbiuzzu
Guest
Posts: n/a
 
      21st Nov 2006
Hi all,

My problem is to create more than 200 Option buttons linked to
different cells
i.e

optionbutton1.linkedcell="A1"

optionbutton2.linkedcell="A2"
.......
........

optionbutton200.linkedcell="A200"

After i've created all optionbuttons, i noticed they all have the same
linked cell
how can i assign them the right linked cell through a macro??


The problem is i have to know which line of my table has been selected
through the related option button....

thanks in advance for your help.

 
Reply With Quote
 
 
 
 
furbiuzzu
Guest
Posts: n/a
 
      21st Nov 2006
furbiuzzu ha scritto:

> Hi all,
>
> My problem is to create more than 200 Option buttons linked to
> different cells
> i.e
>
> optionbutton1.linkedcell="A1"
>
> optionbutton2.linkedcell="A2"
> ......
> .......
>
> optionbutton200.linkedcell="A200"
>
> After i've created all optionbuttons, i noticed they all have the same
> linked cell
> how can i assign them the right linked cell through a macro??
>
>
> The problem is i have to know which line of my table has been selected
> through the related option button....
>
> thanks in advance for your help.




Solved !!!

Sub Macro1()

For i = 1 To 268
Worksheets("Sheets1").OLEObjects("Optionbutton" & i).LinkedCell = "A"
& i + 6
Next i
End Sub

 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      22nd Nov 2006
Depending what you want to achieve, the option buttons from the Forms
toolbar return a number in the same cell, instead of True/False in their own
cells.

NickHK

"furbiuzzu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> furbiuzzu ha scritto:
>
> > Hi all,
> >
> > My problem is to create more than 200 Option buttons linked to
> > different cells
> > i.e
> >
> > optionbutton1.linkedcell="A1"
> >
> > optionbutton2.linkedcell="A2"
> > ......
> > .......
> >
> > optionbutton200.linkedcell="A200"
> >
> > After i've created all optionbuttons, i noticed they all have the same
> > linked cell
> > how can i assign them the right linked cell through a macro??
> >
> >
> > The problem is i have to know which line of my table has been selected
> > through the related option button....
> >
> > thanks in advance for your help.

>
>
>
> Solved !!!
>
> Sub Macro1()
>
> For i = 1 To 268
> Worksheets("Sheets1").OLEObjects("Optionbutton" & i).LinkedCell = "A"
> & i + 6
> Next i
> End Sub
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
there's no assign macro option for command buttons?? frustrated Microsoft Excel Crashes 1 7th Jan 2009 07:00 AM
Code to assign a macro to hundreds of option buttons at once Carl Microsoft Excel Programming 1 14th Nov 2008 09:34 AM
Linking Option Buttons to Cells =?Utf-8?B?Umlza3kgRGF2ZQ==?= Microsoft Excel Discussion 2 21st Sep 2007 08:22 AM
Combo Box linked to query based on Option buttons =?Utf-8?B?SSBET05UIEtOT1c=?= Microsoft Access Forms 2 13th Sep 2007 10:30 PM
Option buttons to select a row of cells mikewild2000 Microsoft Excel Programming 2 27th Dec 2003 02:37 AM


Features
 

Advertising
 

Newsgroups
 


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