LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Worksheet_Change() and range question

On my spreadsheet, I merged the cells N10, O10, and P10
into a single cell.

I then put the following code in my Worksheet_Change()
function:

Private Sub Worksheet_Change(ByVal Target As Range)

MsgBox CStr(Target.Address(0, 0))

End Sub


Now, if you enter data into cell N10 on the spreadsheet,
the message box will return with "N10". However, if you
DELETE the contents of cell N10, then the message box
will say "N10:P10". Why is this?? How can I tell
the "Target" variable to just give me "N10" string???
(I guess I'm too lazy to write code that parses range
strings, haha)

Thanks!



 
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
Worksheet_change question אלי Excel Programming 1 April 27th 09 07:35 AM
Newbie question regarding using Sub Worksheet_change() titus Excel Programming 2 August 30th 06 04:16 AM
worksheet_change question HRman Excel Programming 2 March 30th 06 05:35 PM
Excel VBA .... Worksheet_Change(ByVal Target As Range) question Joseph Donnelly Excel Programming 2 May 17th 04 08:35 PM
Worksheet_Change event question marwan hefnawy Excel Programming 1 September 10th 03 08:53 PM


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