このマクロを複数のシートにまたがるボタンに割り当てるにはどうすればよいですか。すなわち。ボタンの名前が「ボタン 1」か「ボタン 2」かに関係なく?
Public SelectionChange_Enabled As Boolean
Sub Button1_Click()
If ActiveSheet.Shapes("Button 1").TextFrame.Characters.Text = "Disable Events" Then
ActiveSheet.Shapes("Button 1").TextFrame.Characters.Text = "Enable Events"
SelectionChange_Enabled = False
Else
ActiveSheet.Shapes("Button 1").TextFrame.Characters.Text = "Disable Events"
SelectionChange_Enabled = True
End If
End Sub