+ Reply to Thread
Results 1 to 3 of 3

worksheet_change question

  1. #1
    HRman
    Guest

    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. #2
    Registered User
    Join Date
    06-09-2004
    Posts
    40
    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.

  3. #3
    Jim Thomlinson
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1