View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Worksheet Change Events

I am monitoring a column on a worksheet for changes - using the change
event. I check that the column is the correct one and use the value of the
cell to decide on the action to take. Code as follows

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 9 And Target.Value 0 Then
' take some action
End If
End Sub

All works well until I select a Range of cells, then the Target.Value throws
an error.

My questions are

1. How can I test if the user has chosen more than one cell ?

2. How can I iterate through a multi-cell selection and act on each value in
turn?

Many thanks

--
Cheers
Nigel