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

I have a spreadsheet that users may update. When they do update a value, I
want to check that it falls within certain ranges dependant on other cells in
the sheet (so I can't use the data validation function). I am using
worksheet_change which works OK in terms of detecting a change, but how can I
find out which cell they have changed. I tried using activecell, but that
does not work if they move to another cell using the mouse, rather than
pressing return. Any Ideas

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default worksheet_change question


Create duplicate cells that you want to refer to on your input
worksheet. Let's say your input worksheet is Sheet1 and ranges you want
to validate the input against in Sheet 2 and 3.

Sheet1!A1=Sheet2!B10
Sheet1!A2=Sheet3!C45

Now you can use data validation by using values on A1 and A2 on Sheet1.


--
renegan
------------------------------------------------------------------------
renegan's Profile: http://www.excelforum.com/member.php...o&userid=10450
View this thread: http://www.excelforum.com/showthread...hreadid=528159

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default worksheet_change question

The argument of the change function is Target as Range and that is the cell
that was just changed... Add this code to your change event to see what I mean

msgbox "Cell " & target.address & " was changed to " & target.value


--
HTH...

Jim Thomlinson


"HRman" wrote:

I have a spreadsheet that users may update. When they do update a value, I
want to check that it falls within certain ranges dependant on other cells in
the sheet (so I can't use the data validation function). I am using
worksheet_change which works OK in terms of detecting a change, but how can I
find out which cell they have changed. I tried using activecell, but that
does not work if they move to another cell using the mouse, rather than
pressing return. Any Ideas

Thanks

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
Worksheet_Change procedure question Grant Excel Programming 0 October 1st 04 01:17 AM
Worksheet_Change procedure question Grant Excel Programming 0 September 28th 04 08:41 PM
Excel VBA .... Worksheet_Change(ByVal Target As Range) question Joseph Donnelly Excel Programming 2 May 17th 04 08:35 PM
Noob question - Worksheet_Change Rich Wallace Excel Programming 3 May 14th 04 07:53 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 01:32 AM.

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"