ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Links to multiple Checkboxes (https://www.excelbanter.com/excel-programming/368661-links-multiple-checkboxes.html)

Bahboosh

Links to multiple Checkboxes
 
I'm trying to link a range of cells that include checkboxes to an
adjacent column, but i dont want to go into each cell and link them
seperatley. Is there an easier way to do this?
Ex.:

A1:A100 include the checkboxes


C1:C100 linked cells


Thanks


Tom Ogilvy

Links to multiple Checkboxes
 
What kind of checkboxes - control toolbox toolbar or forms toolbar.

--
Regards,
Tom Ogilvy


"Bahboosh" wrote:

I'm trying to link a range of cells that include checkboxes to an
adjacent column, but i dont want to go into each cell and link them
seperatley. Is there an easier way to do this?
Ex.:

A1:A100 include the checkboxes


C1:C100 linked cells


Thanks



Bahboosh

Links to multiple Checkboxes
 
Tom Ogilvy wrote:
What kind of checkboxes - control toolbox toolbar or forms toolbar.

--
Regards,
Tom Ogilvy


Forms toolbar checkboxes


Tom Ogilvy

Links to multiple Checkboxes
 
Sub LinkBoxes()
Dim cbox As CheckBox
For Each cbox In ActiveSheet.CheckBoxes
Set rng = cbox.TopLeftCell '(or cbox.BottomRightCell)
cbox.LinkedCell = rng.Offset(0, 1).Address
Next
End Sub

The success of this method will depend on where the control is sitting (i.e.
what cell is returned for topleftcell [or bottomrightcell]).

if the top left corner is over the cell to the left of where you want to
link you are good to go.

--
Regards,
Tom Ogilvy


"Bahboosh" wrote:

Tom Ogilvy wrote:
What kind of checkboxes - control toolbox toolbar or forms toolbar.

--
Regards,
Tom Ogilvy


Forms toolbar checkboxes




All times are GMT +1. The time now is 02:25 AM.

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