Results 1 to 3 of 3
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    data validation + events (Excel 2003/ SP1)

    I have a bunch of code that creates 4 data validation lists on a worksheet when the user enters adds a new entry to four worksheets. This works great, however I now need to know when they select one particular item from the list. When they select this special list item, I need to flag that entire row for deletion (which I do when the de-activate the current worksheet).

    I can't get the worksheet_change() or worksheet_selectionchang() events to trigger when a cell is changed due to data validation. I think I remember hearing that no triggers are fired for these data validation lists.

    How else can I determine if one particular list item was selected and take action on it? I'd like to do this w/o forcing the user to push a button or go to another sheet or whatever. I was going to issue a warning message that by selecting this list item the current row will be deleted. I'll then highlight that row temporarily (in case they change their mind, they can select a different item from the list). On worksheet deactivate (or workbook close) I'll then remove the row(s) of the sheets that contain this particular value.

    Thnx, Deb

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: data validation + events (Excel 2003/ SP1)

    In Excel 97, the Worksheet_Change event didn't occur if the user selected an item from a validation dropdown list. Starting with Excel 2000, it does. I just verified this in Excel 2002.

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: data validation + events (Excel 2003/ SP1)

    Ahhh then I'm only partly crazy. After I got your reply I double-checked my code and I see where I went wrong. You are correct, it does trigger the ws_Change() event. I had a typo in what I was looking for <img src=/S/eyeout.gif border=0 alt=eyeout width=15 height=15> <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15> so of course it didn't find it.

    *sigh* Thanks for the kick in the pants. Fortunately in this case I don't have to worry abut xl97.

    Deb

Posting Permissions

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