Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default SelectionChange event

Hi everybody,
In a
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
statement the Target variable contains the VALUE of the target cell. I need
the row number of the target cell. How can I get it?
Stefi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SelectionChange event


Not sure what you're after because you didn't post your code but instea
of Target.Value try this....Target.Value & Target.Address.

hope this helps

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=27315

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SelectionChange event

Target is a reference to the cell selected (a range object). Value is the
default attribute/property if you just use the variable target (msgbox
Target, equivalent to msgbox Target.Value). If you want the row use
Target.Row, or for column, Target.column

--
Regards,
Tom Ogilvy


"Stefi" wrote in message
...
Hi everybody,
In a
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
statement the Target variable contains the VALUE of the target cell. I

need
the row number of the target cell. How can I get it?
Stefi



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
how to use selectionchange instead of doubleclick event? ghost Excel Discussion (Misc queries) 0 December 24th 08 05:00 AM
Worksheet SelectionChange Event mjack003 Excel Discussion (Misc queries) 2 May 8th 06 08:35 PM
Disable SelectionChange Event BillCPA Excel Discussion (Misc queries) 2 February 17th 06 06:45 PM
Excel Automation SelectionChange event cpotts Excel Discussion (Misc queries) 1 December 20th 04 05:15 PM
SelectionChange Event Squid[_3_] Excel Programming 5 February 11th 04 01:57 PM


All times are GMT +1. The time now is 03:29 PM.

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

About Us

"It's about Microsoft Excel"