Link to home
Start Free TrialLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

asked on

BackColor & Forecolor

Folks,
In my workbook I have over 325 worksheets. Each worksheet has multiple command buttons. For every command button, without exceeption, can be modified except the BackColor and Forecolor properties, regardless. When I select to change a color the property acts like nothing has happened.

All command buttons are ActiveX type. A few of the worksheets are protected and the workbook is not protected.

Maybe it is my machine, but I have attached a copy of this large workbook
Excel-Formulas-and-Functions.xlsm
Avatar of Harry Lee
Harry Lee
Flag of Canada image

When you decided to upload sample file, please do no upload protect files that experts cannot edit to help you.
ASKER CERTIFIED SOLUTION
Avatar of Harry Lee
Harry Lee
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Frank Freese

ASKER

It works for me at home also. Must be something at work.
I normally leave a workbook unprotected and I simply forgot this time.
I apologize to all Experts
thanks
I appreciate you looking into this for me
Avatar of Martin Liss
I'm a bit late but just in case it helps here's a routine you can use. (I haven't looked at Harry's code)

Sub ColorEm()
Dim shp As Shape 

For Each shp In ActiveSheet.Shapes
    ActiveSheet.OLEObjects(shp.Name).Object.BackColor = vbRed
Next
End Sub

Open in new window

Martin,
Thanks for looking into this. Apparently it is something with the notebook I use at work. Everything works fine here at home.
I again apologize for not un-protecting some of my sheets. I am so grateful to all Experts and try not to make things more difficult than htey are.
Have a great day!