I have found several codes to do this and am now trying :
Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, Range("D6, E6, D11, D12, D24, D25, D26")) Is Nothing Then
Run Correct
End If
Application.EnableEvents = True
End Sub
Part of the Sub Correct changes E6 to D6+180 if D6 is changed to a number >0 and <180; or to D6-180 if D6 is >180 and <361
The problem is that the sub Correct does not run when D6 is changed. It does run correctly if I go into the VBA Editor and run it from there.
Any help on making it run automatically gratefully received.
Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, Range("D6, E6, D11, D12, D24, D25, D26")) Is Nothing Then
Run Correct
End If
Application.EnableEvents = True
End Sub
Part of the Sub Correct changes E6 to D6+180 if D6 is changed to a number >0 and <180; or to D6-180 if D6 is >180 and <361
The problem is that the sub Correct does not run when D6 is changed. It does run correctly if I go into the VBA Editor and run it from there.
Any help on making it run automatically gratefully received.