Thread: vba event
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default vba event

Hi Daniel
use the worksheet change event and restrict the range it should
process. e.g.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1:A10")) Is Nothing Then Exit Sub
'your code

End Sub

your code is only processed if a single cell in the range A1:A10 is
changed


--
Regards
Frank Kabel
Frankfurt, Germany

Daniel P wrote:
Hello,

I've created a cell that has a validation list associated to it.
Which Event can I use so that it will run that event when and only
when that validation range is modified?

Currently I've have the macro in the sheet_change section but this
mean that it run whenever any change occurs on the sheet and this is
useless. I only need it to run if the selection from the validation
range changes

Thank you for your help,

Daniel