Hi guys,
I've implanted data validation into some cells and I need to be able to catch any modifications to these cells. If the user change the value from A to B, I would like to trap this event using VBA.
I've tried to record a macro, change the value of the cell using the data validation but unfortunately, it didn't generate any code at all.
Can someone point me in the right direction ?
Thank you !
Nicolas.
I found it, I just have to catch the Worksheet change event !
I guess there is no other way to proceed...
Thanks anyways
Assuming the validation is in C2 try
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address <> "$C$2" Then Exit Sub MsgBox Target.Value End Sub
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks