Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Target Address Property for Insert/Delete Row/Column

Hi EM

I assume you are working with an event code. Declare a variable at the very
top of the worksheet module to remember LastTarget.

Dim LastTarget As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastTarget Is Nothing Then
MsgBox ("Current Target is " & Target.Address & vbLf & "Last Target was
" & LastTarget.Address)
End If
Set LastTarget = Target
End Sub

Hopes this helps

-Per

"Excel Monkey" skrev i meddelelsen
...
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 Property for Insert/Delete Row/Column Patrick Molloy[_2_] Excel Programming 0 April 20th 09 06:13 PM
Insert a new column using a variable as address in a macro MackPetD Excel Programming 2 July 31st 06 07:46 AM
Target.Address syntax Coolboy55 Excel Worksheet Functions 3 August 23rd 05 12:23 AM
Row/Column Insert/Delete Von Shean Excel Programming 1 January 21st 04 10:09 AM
target address Mark Kubicki Excel Programming 2 October 31st 03 04:19 PM


All times are GMT +1. The time now is 11:27 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"