![]() |
change cell link for many check boxes at once
I use a lot of check boxes (from the Forms toolobar) in my application.
Often they are all in a column and I want all of the linked cells to be all in a column as well. For example, Checkbox1 (CB1) is in c1, linked to r1; CB2 is in c2 linked to r2, CB3 is in C3 linked to R3, etc. Is there any way to set all the cell links at once using some form of relative referencing? I have not been able to do this. I have to set each individual cell link reference by hand. I am using Office 2003. -- Thanks, Andy |
change cell link for many check boxes at once
Are you familiar with VBA? it can be done with that fairly easily, why not join our forums and upload a workbook where we can help you further! -- The Code Cage Team Regards, The Code Cage Team www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27249 |
change cell link for many check boxes at once
I am somewhat familiar with VBA, enough to do some fairly simple things. My
application is over 20 worksheets and 1MB in size. Perhaps you could post some code samples here? I would appreciate it. -- Thanks, Andy "The Code Cage Team" wrote: Are you familiar with VBA? it can be done with that fairly easily, why not join our forums and upload a workbook where we can help you further! -- The Code Cage Team Regards, The Code Cage Team www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27249 |
change cell link for many check boxes at once
If you want checkboxes in a column all linked to its offset then this blog is right up your street! 'Terminally Incoherent Blog Archive Excel: Adding Checkboxes the Easy Way' (http://tinyurl.com/6557gc) -- The Code Cage Team Regards, The Code Cage Team www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=27249 |
change cell link for many check boxes at once
r1, r2, r3, ... are cell addresses, right?
You could try this: Option Explicit Sub testme() Dim CBX As CheckBox For Each CBX In ActiveSheet.CheckBoxes With CBX .LinkedCell _ = .Parent.Cells(.TopLeftCell.Row, "R").Address(external:=True) End With Next CBX End Sub AndyC812 wrote: I use a lot of check boxes (from the Forms toolobar) in my application. Often they are all in a column and I want all of the linked cells to be all in a column as well. For example, Checkbox1 (CB1) is in c1, linked to r1; CB2 is in c2 linked to r2, CB3 is in C3 linked to R3, etc. Is there any way to set all the cell links at once using some form of relative referencing? I have not been able to do this. I have to set each individual cell link reference by hand. I am using Office 2003. -- Thanks, Andy -- Dave Peterson |
change cell link for many check boxes at once
Thanks to all. I figured out a way using macros.
-- Thanks, Andy "Dave Peterson" wrote: r1, r2, r3, ... are cell addresses, right? You could try this: Option Explicit Sub testme() Dim CBX As CheckBox For Each CBX In ActiveSheet.CheckBoxes With CBX .LinkedCell _ = .Parent.Cells(.TopLeftCell.Row, "R").Address(external:=True) End With Next CBX End Sub AndyC812 wrote: I use a lot of check boxes (from the Forms toolobar) in my application. Often they are all in a column and I want all of the linked cells to be all in a column as well. For example, Checkbox1 (CB1) is in c1, linked to r1; CB2 is in c2 linked to r2, CB3 is in C3 linked to R3, etc. Is there any way to set all the cell links at once using some form of relative referencing? I have not been able to do this. I have to set each individual cell link reference by hand. I am using Office 2003. -- Thanks, Andy -- Dave Peterson |
change cell link for many check boxes at once
That's what this did, too.
AndyC812 wrote: Thanks to all. I figured out a way using macros. -- Thanks, Andy "Dave Peterson" wrote: r1, r2, r3, ... are cell addresses, right? You could try this: Option Explicit Sub testme() Dim CBX As CheckBox For Each CBX In ActiveSheet.CheckBoxes With CBX .LinkedCell _ = .Parent.Cells(.TopLeftCell.Row, "R").Address(external:=True) End With Next CBX End Sub AndyC812 wrote: I use a lot of check boxes (from the Forms toolobar) in my application. Often they are all in a column and I want all of the linked cells to be all in a column as well. For example, Checkbox1 (CB1) is in c1, linked to r1; CB2 is in c2 linked to r2, CB3 is in C3 linked to R3, etc. Is there any way to set all the cell links at once using some form of relative referencing? I have not been able to do this. I have to set each individual cell link reference by hand. I am using Office 2003. -- Thanks, Andy -- Dave Peterson -- Dave Peterson |
change cell link for many check boxes at once
Thanks, Dave. I know, and it's much more elegant than what I came up with.
I will definitly try it your way! -- Thanks, Andy "Dave Peterson" wrote: That's what this did, too. AndyC812 wrote: Thanks to all. I figured out a way using macros. -- Thanks, Andy "Dave Peterson" wrote: r1, r2, r3, ... are cell addresses, right? You could try this: Option Explicit Sub testme() Dim CBX As CheckBox For Each CBX In ActiveSheet.CheckBoxes With CBX .LinkedCell _ = .Parent.Cells(.TopLeftCell.Row, "R").Address(external:=True) End With Next CBX End Sub AndyC812 wrote: I use a lot of check boxes (from the Forms toolobar) in my application. Often they are all in a column and I want all of the linked cells to be all in a column as well. For example, Checkbox1 (CB1) is in c1, linked to r1; CB2 is in c2 linked to r2, CB3 is in C3 linked to R3, etc. Is there any way to set all the cell links at once using some form of relative referencing? I have not been able to do this. I have to set each individual cell link reference by hand. I am using Office 2003. -- Thanks, Andy -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 12:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com