I have a workbook with a sheet set up as the user interface to a table of raw data on a hidden sheet. The user interface sheet has buttons to perform various actions on the selected "record" and to navigate back and forth within the records.
The look of the standard MSForms and ActiveX Command Buttons and Toggle Buttons doens't jive with my aesthetics, so I opted to use rectangle shapes assigned to macros to act as buttons. The macro determines the "state" of the shape button by the Forecolor property (I use a light color as "off" and a dark color as "on"). The macro will then change the color as appropriate.
Here's where I've run into a problem. When I protect the sheet without selecting the option to "Edit Objects", I get a runtime error because the macro is trying to edit the object (change color of shape buttons). However, if I select the option to "Edit Objects" when protecting the sheet, it leaves the shape buttons unprotected and vulnerable to accidental modification by the end users.
Toggle Buttons and Command Buttons would be ideal to work around this problem, but, once again, they don't match the look. Even if I change the BackColor of the objects, they still have the visual effect of being raised and sunken. I tried setting the SpecialEffect property of the ToggleButton to flat, but I get an error (apparently, that property is not really supported by Toggle Buttons).
Is there some other way of making Toggle and Command buttons flat? Perhaps some other control or object that I can use as buttons that will support my need to be flat and to allow color changes even with a protected sheet?
The look of the standard MSForms and ActiveX Command Buttons and Toggle Buttons doens't jive with my aesthetics, so I opted to use rectangle shapes assigned to macros to act as buttons. The macro determines the "state" of the shape button by the Forecolor property (I use a light color as "off" and a dark color as "on"). The macro will then change the color as appropriate.
Here's where I've run into a problem. When I protect the sheet without selecting the option to "Edit Objects", I get a runtime error because the macro is trying to edit the object (change color of shape buttons). However, if I select the option to "Edit Objects" when protecting the sheet, it leaves the shape buttons unprotected and vulnerable to accidental modification by the end users.
Toggle Buttons and Command Buttons would be ideal to work around this problem, but, once again, they don't match the look. Even if I change the BackColor of the objects, they still have the visual effect of being raised and sunken. I tried setting the SpecialEffect property of the ToggleButton to flat, but I get an error (apparently, that property is not really supported by Toggle Buttons).
Is there some other way of making Toggle and Command buttons flat? Perhaps some other control or object that I can use as buttons that will support my need to be flat and to allow color changes even with a protected sheet?