根据单元格值隐藏形状

我正在使用下面的代码来隐藏/取消隐藏基于单元格值的一些形状。 隐藏/显示正在工作,但形状作为链接,当我点击其中一些只是改变,并开始同时显示所有的形状。 有没有更好的代码来做到这一点?

Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$50" Then 'AAA Shapes("XXX1").Visible = Target.Value = "ABC" Shapes("XXX2").Visible = Target.Value = "ABC" Shapes("XXX3").Visible = Target.Value = "ABC" 'BBB Shapes("YYY1").Visible = Target.Value = "DEF" 'CCC Shapes("ZZZ1").Visible = Target.Value = "GHI" Shapes("ZZZ2").Visible = Target.Value = "GHI" Shapes("ZZZ3").Visible = Target.Value = "GHI" End If End Sub