Hi
I have been trying to use VBA to change the color of a set of command buttons using variables rather than individually in code. Individually no problem using
ActiveSheet.CB1.BackColor = RGB(x, y, z)
where CB1 is the button.
I can change the color of Excel shapes with variables using the following syntax
ActiveSheet.Shapes("Shape" & a).Fill.ForeColor.RGB = RGB(x, y, z)
however changing command buttons using this syntax does not work, surprisingly it does not give an error but does not change anything either.
Using variants of both code segments I have tried as many as I can find and so far have been unable to achieve the color change.
If anyone has any pointers they can give me it would be much appreciated.
Many thanks
Jeff
Bookmarks