shapes on a sheet
A rectangle does have an enabled property, but it doesn't seem to do much.
You could, however, set it with your code, then have the click event check
the value of that property
Sub Rectangle_click()
sName = Application.Caller
Set rect = ActiveSheet.Rectangles(sName)
If rect.Enabled Then
MsgBox rect.Name & ", Yes I am enabled"
else
msgbox "I am not able to help at this time"
End If
End Sub
activesheet.shapes(1).controlformat.Enabled = false
activesheet.shapes("Rectangle 1").controlformat.Enabled = false
activsheet.Rectangles("Rectangle 1").Enabled = False
--
Regards,
Tom Ogilvy
"JT" wrote in message
...
I have several rectangles that I use as buttons on my
spreadsheet to kick off certain macros.
Can I enable and disable these rectangles like you can do
with buttons on a form?
Any help with the syntax would be appreciated. Thanks...
|