When I made a change in the third sheet, then it updates the first sheet and you get the error because the activesheet is the third sheet. If you make this change to your code it works:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D5")) Is Nothing Then
macro1
End If
If Not Intersect(Target, Range("D7")) Is Nothing Then
macro2
End If
If Not Intersect(Target, Range("D9")) Is Nothing Then
macro3
End If
End Sub
Sub macro1()
If WorksheetFunction.CountIf(Range("E5"), "<0") Then
Me.Shapes("Picture 1").Visible = msoTrue
Else
Me.Shapes("Picture 1").Visible = msoFalse
End If
End Sub
Sub macro2()
If WorksheetFunction.CountIf(Range("E7"), "<0") Then
Me.Shapes("Picture 2").Visible = msoTrue
Else
Me.Shapes("Picture 2").Visible = msoFalse
End If
End Sub
Sub macro3()
If WorksheetFunction.CountIf(Range("E9"), "<0") Then
Me.Shapes("Picture 3").Visible = msoTrue
Else
Me.Shapes("Picture 3").Visible = msoFalse
End If
End Sub
the predefined object Me is appropriate in code in a sheet module and it represents the sheet that contains the code. This is the proper qualification for those shapes since they are on the first sheet and the code is in the first sheet module.
You could explicitly qualify them with code like this
worksheets("Sales").Shapes("Picture 2").Visible = msoTrue
rather than use Me
--
Regards,
Tom Ogilvy