Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Target Address Property for Insert/Delete Row/Column
you're witnessing the ActiveCell of the selected range
the answer is not quite so straightforward. if you create a PUBLIC (ie Global) string variable, you can save the cell/s selected address, then the next time a new rangeb is selected , you'll have the 'target' and the 'source' in a Standard Code Module have these two lines: Option Explicit Public Source As String In the sheet's code page, code the selection change event like this: Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.StatusBar = "From " & Source & " to " & Target.Address Source = Target.Address End Sub now, when you move around the worksheet, you'll see the staus bar in the lower left show you where you moved to and where from Hope this helps Patrick Molloy "Excel Monkey" wrote: When I select call A1, the address property of the target is "$A$1". When I select A1 and then hit Delete/Insert Rows/Column, the target is set to $1:$1. However A1 is still selected visually (i.e. row 1 is not highlighted). I am assuming that this is Excel's way of addressing where to insert/delete the new range. I need to find a way of referencing what the single cell address was prior to excel changing it. Any ideas Thanks EM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Target.Address Question | Excel Programming | |||
Can you use a Range $N$xx:$Q$xx in Target.Address? | Excel Programming | |||
Insert a new column using a variable as address in a macro | Excel Programming | |||
Using Target.Address in Excel 98 | Excel Discussion (Misc queries) | |||
target address | Excel Programming |