Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
linked cell
Hi.
Ive got a small question Is there a possibility to link the VBA code to the cells? So when you are referring to cell A1 and you insert a row the VBA script automatically changes the value to A2. Best regards, Chris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
linked cell
Click on the cell A1 then Insert(menu) Name Define ... name it "mycell"
Try inserting rows and columns the code below should refer to the same cell because named ranges keep there relative reference when cells, columns or rows are deleted or inserted. Range("mycell") = Range("mycell") + 1 -- Regards, Rocky McKinley "chris" wrote in message ... Hi. I've got a small question Is there a possibility to link the VBA code to the cells? So when you are referring to cell A1 and you insert a row the VBA script automatically changes the value to A2. Best regards, Chris |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
linked cell
use named ranges.
So when you insert a row, the named range also shifts and your VBA code is not affected. Mangesh "chris" wrote in message ... Hi. I've got a small question Is there a possibility to link the VBA code to the cells? So when you are referring to cell A1 and you insert a row the VBA script automatically changes the value to A2. Best regards, Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I have a linked cell auto-size to fit the linked data? | Excel Discussion (Misc queries) | |||
Using a cell reference to create linked info in another cell | Excel Discussion (Misc queries) | |||
In Cell Validation List & Linked Cell VLOOKUP | Excel Discussion (Misc queries) | |||
How to force a cell value to change if Linked cell moves? | Excel Discussion (Misc queries) | |||
how do i record changing cell data (cell is dde linked) | Excel Discussion (Misc queries) |