Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Check box cell link - copy problem

I'm developing a spreadsheet that's going to have over 100 checkboxes that
each have a specific cell link. After I created one row, I attempted to copy
them all to the next row down but the cell link of the check box still
referenced the original cell in the prior row. Is there an easy way to get
the cell link to change to the new cell when copying or do I have to change
each of these individually (OUCH!)?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Check box cell link - copy problem

You'd need a macro.

--
Jim
"mailrail" wrote in message
...
| I'm developing a spreadsheet that's going to have over 100 checkboxes that
| each have a specific cell link. After I created one row, I attempted to
copy
| them all to the next row down but the cell link of the check box still
| referenced the original cell in the prior row. Is there an easy way to get
| the cell link to change to the new cell when copying or do I have to
change
| each of these individually (OUCH!)?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Check box cell link - copy problem

Yeah...I sort of figured that. Anyone have one already written?

"Jim Rech" wrote:

You'd need a macro.

--
Jim
"mailrail" wrote in message
...
| I'm developing a spreadsheet that's going to have over 100 checkboxes that
| each have a specific cell link. After I created one row, I attempted to
copy
| them all to the next row down but the cell link of the check box still
| referenced the original cell in the prior row. Is there an easy way to get
| the cell link to change to the new cell when copying or do I have to
change
| each of these individually (OUCH!)?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Check box cell link - copy problem

I wrote this just now in the hopes that you'll be able to adjust it as
needed for your situation.

This macro assumes that after you copy the checkboxes the new checkboxes
will all have their top edges in the same row and all the checkboxes in that
row have to be adjusted. So say you copy checkboxes in row 1 to row 2. The
top edges of the new checkboxes are all in row 2 and there are no old
checkboxes in row 2.

Select any cell in row 2. This tells the macro that only the checkboxes in
that row are to be adjusted. Then run this macro. It will adjust the
linked cell of each check box in the active row downward one row.

Sub a()
Dim CB As CheckBox
Dim RowNum As Long
RowNum = ActiveCell.Row
For Each CB In ActiveSheet.CheckBoxes
If CB.TopLeftCell.Row = RowNum Then
CB.LinkedCell = Range(CB.LinkedCell).Offset(1).Address ''Adj
down 1 row
End If
Next
End Sub

--
Jim
"mailrail" wrote in message
...
| Yeah...I sort of figured that. Anyone have one already written?
|
| "Jim Rech" wrote:
|
| You'd need a macro.
|
| --
| Jim
| "mailrail" wrote in message
| ...
| | I'm developing a spreadsheet that's going to have over 100 checkboxes
that
| | each have a specific cell link. After I created one row, I attempted
to
| copy
| | them all to the next row down but the cell link of the check box still
| | referenced the original cell in the prior row. Is there an easy way to
get
| | the cell link to change to the new cell when copying or do I have to
| change
| | each of these individually (OUCH!)?
|
|
|


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
Copy and link formats from cell to cell Kathrine J Wathne Excel Discussion (Misc queries) 0 June 15th 06 03:54 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
copy combobox - cell link to change automatically Bojana Excel Worksheet Functions 1 June 8th 05 02:35 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Can I copy a combo box in Excel 2002 with a relative cell link? Bozo Excel Discussion (Misc queries) 1 February 17th 05 02:05 AM


All times are GMT +1. The time now is 01:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"