Sorry! Forgot to add restrictive conditions.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address <> [e5].Address And Target.Address <> [f5].Address Then Exit Sub
If [e5] <= 0 Or [f5] <= 0 Then MsgBox "Input Error!": Exit Sub
Dim obj As Object
For Each obj In Shapes
If obj.Name Like "Right Triangle *" Then
obj.Height = [f5]
obj.Width = [e5]
Exit Sub
End If
Next
Set obj = ActiveSheet.Shapes.AddShape(msoShapeRightTriangle, 200, 200, [f5], [e5])
End Sub