ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to assign different Linked cells to option buttons (https://www.excelbanter.com/excel-programming/377831-how-assign-different-linked-cells-option-buttons.html)

furbiuzzu

How to assign different Linked cells to option buttons
 
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.


furbiuzzu

How to assign different Linked cells to option buttons
 
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


NickHK

How to assign different Linked cells to option buttons
 
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" wrote in message
ups.com...
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





All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com