|
これで如何でしょうか?
シートモジュールのWクリックイベントです。
(標準モジュールではないです)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'C5 有
'F5 無
If Target.Address = Range("C5").Address Then
Cancel = True
If ActiveSheet.Shapes("Oval 1").Visible = False Then
ActiveSheet.Shapes("Oval 1").Visible = True
Else
ActiveSheet.Shapes("Oval 1").Visible = False
End If
ElseIf Target.Address = Range("F5").Address Then
Cancel = True
If ActiveSheet.Shapes("Oval 2").Visible = False Then
ActiveSheet.Shapes("Oval 2").Visible = True
Else
ActiveSheet.Shapes("Oval 2").Visible = False
End If
End If
End Sub
|
|