|
試してみて下さい。
Private Sub OptionButton1_Click()
Dim MyShape As Shape
For Each MyShape In ActiveSheet.Shapes
If MyShape.Type = msoAutoShape Then
MyShape.Delete
End If
Next
ActiveSheet.Shapes.AddShape(msoShapeOval, OptionButton1.Left + 50, OptionButton1.Top - 25, 100#, 100).Select
End Sub
'−−−−−−−−−−−−−−−−−−−−−−−−−−−
Private Sub OptionButton2_Click()
Dim MyShape As Shape
For Each MyShape In ActiveSheet.Shapes
If MyShape.Type = msoAutoShape Then
MyShape.Delete
End If
Next
ActiveSheet.Shapes.AddShape(msoShapeOval, OptionButton2.Left + 50, OptionButton2.Top - 25, 100#, 100).Select
End Sub
|
|