Public DisableShape As Boolean 'at top of module
Sub MyShapeName_Click()
If DisableShape Then
MsgBox "shape is disabled"
Exit Sub
Else
MsgBox "Macro goes here"
DisableShape = True
End If
End Sub
Sub ReEnableShape()
DisableShape = False
End Sub
Public DisableShape As Boolean 'at top of module
DisableShape = True
If DisableShape Then Exit Sub
Sub Copy()
Workbooks("2").Sheets("Chit1&2").Range("E20:H21").Value = "=" & "'C:\Users\littl\Desktop\[1.xlsm]Chit1&2'!E20:H21"
Workbooks("2").Sheets("Chit3&4").Range("E20:H21").Value = "=" & "'C:\Users\littl\Desktop\[1.xlsm]Chit3&4'!E20:H21"
Workbooks("2").Sheets("Chit5&6").Range("E20:H21").Value = "=" & "'C:\Users\littl\Desktop\[1.xlsm]Chit5&6'!E20:H21"
Workbooks("2").Sheets("Chit1&2").Cells(8, "J").Value = "=" & "'C:\Users\littl\Desktop\[1.xlsm]Chit1&2'!J8"
Workbooks("2").Sheets("Chit3&4").Cells(8, "J").Value = "=" & "'C:\Users\littl\Desktop\[1.xlsm]Chit3&4'!J8"
Workbooks("2").Sheets("Chit5&6").Cells(8, "J").Value = "=" & "'C:\Users\littl\Desktop\[1.xlsm]Chit5&6'!J8"
End Sub
Function IsEnabled(aShape As Object) As Boolean
IsEnabled = CBool(aShape.Reflection.Size)
End Function
Sub SetShapeEnable(aShape As Object, EnableVal As Boolean)
aShape.Reflection.Size = Abs(CLng(EnableVal))
End Sub
Sub Macro1()
If Not IsEnabled(ActiveSheet.Shapes(Application.Caller)) Then Exit Sub
MsgBox "your code here"
SetShapeEnable ActiveSheet.Shapes(Application.Caller), False
End Sub