View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Change Event Problem

Hi John,

Try something like:

'=============
Private Sub Worksheet_Change(ByVal Target As Range)
Const sAdd1 As String = "AQ3"
Const sAdd2 As String = "AP6"

If Not Intersect(Range(sAdd1), Target) Is Nothing Then
'Do something, e.g.;
MsgBox "Action1!"
End If

If Not Intersect(Range(sAdd2), Target) Is Nothing Then
'Do something else, e.g.;
MsgBox "Action2!"
End If
End Sub
'<<=============



---
Regards,
Norman


"mastermind" wrote in message
ps.com...
I would like to have a change event for two seperate ranges: "AQ3" and
"AP6." However, I want different operations done, depending on which
range is changed. If someone can help me get the main sections of
code, I will be able to fill in the operations.

John