View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Change_Event target either of two cells

Hi Howard,

Am Thu, 29 May 2014 23:15:26 -0700 (PDT) schrieb L. Howard:

Then if I change J5 it does its work and sends B5's called code into a continual loop for about 20 reps then errors out and the workbook freezes up.


try:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B5,J5")) Is Nothing Then

If Target.Count 1 Then Exit Sub

Application.EnableEvents = False
On Error GoTo EventsOn

If Target = Range("B5") Then
Scan_In_Check
End If

If Target = Range("J5") Then
Scan_Out_Check
End If

End If

EventsOn:
Application.EnableEvents = True
End Sub

If this does not solve the problem please post "Scan_In_Check" and
"Scan_Out_Check"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional