Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Data Validation & Worksheet_change

I am trying to use data validation to restrict users to a list of people's
names, which is contained in range somewhere in the file. However, I'd like
the user to enter a different name if they really want to. If they do, I've
got to intercept it, validate it, and then add it into the list for future
reference in the data validation. I've changed the Data Validation to not
create an immediate error alert.

My approach to this was within the Worksheet change event.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Intersect(Target, Range("lstLaborInputName")) Is Nothing) Then
If Target.Validation.Value = False Then
'code to validate and add to valid to list
End If
End If
End Sub
Where the first IF statement decides whether the change took place in the
area I want to evaluate.

However, the Target.Validation.Value is always returning true, regardless of
what is entered when I make the change.

Here's the wierd part, though, if I undo what I typed and the cell is still
"invalid", the code triggers. If the undo value is valid, it doesn't, i.e.
the code seems to work fine.

Does using the Data Validation dropdown not trigger a worksheet change
event? I can't find any references to that,

Any ideas?

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
Update on Worksheet_change with data from other sheets? Ouka[_3_] Excel Programming 1 June 18th 05 06:08 AM
clearcontents, worksheet_change, cell validation Jan Excel Programming 2 January 26th 05 05:11 AM
MS Bug? Data validation list dropdown with Worksheet_Change event Dan Frederick Excel Programming 0 April 6th 04 05:35 AM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


All times are GMT +1. The time now is 05:17 AM.

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

About Us

"It's about Microsoft Excel"