shapes on a sheet
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... |
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... |
shapes on a sheet
Hi,
you can use the sheet protection and protect the objects only. It will allow you doing everything you want in the sheet but won't allow grabbing the objects. Regards JT a écrit : 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... |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com