Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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
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
Target.Address Question Leiprecht Excel Programming 3 April 13th 09 08:33 PM
Can you use a Range $N$xx:$Q$xx in Target.Address? CRayF Excel Programming 7 December 14th 06 09:11 PM
Insert a new column using a variable as address in a macro MackPetD Excel Programming 2 July 31st 06 07:46 AM
Using Target.Address in Excel 98 Noemi Excel Discussion (Misc queries) 2 November 7th 05 01:36 PM
target address Mark Kubicki Excel Programming 2 October 31st 03 04:19 PM


All times are GMT +1. The time now is 09:55 AM.

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"