PDA

View Full Version : Chage background colour



blackie42
04-29-2008, 02:16 PM
Just a quick question - is it possible to change the background colour of a button - the one on the sheet thats used to open a userform for instance.

thanks

Jon

lucas
04-29-2008, 02:43 PM
Yes if you use a button from the visual basic control toolbox instead of the forms toolbar.

right click on any toolbar and check the one that says visual basic. Find the control toolbox on that toolbar and create your button from there. right click on it and select properties....just like a userform.

I try to avoid buttons on the sheet if I can though.

blackie42
04-29-2008, 02:55 PM
Thanks - didn't even see the visual basic toolbar

Ken Puls
04-29-2008, 07:47 PM
Be aware that Forms buttons don't trigger any security warnings. Depending on the versions of your operating system and your version of Excel, you can run into issues with ActiveX.

Case in point, when we first deployed a Windows 2003 server, it locks down ActiveX controls. It was a royal PITA as it led to some really weird issues for us. Excel 2007 also has features in it to lock down ActiveX controls, so depending on the voracity of your IT department, it could come back to haunt you.

(Not saying don't use them, just be aware.)

Personally, I'm with Steve. I try to avoid buttons where I can.

Bob Phillips
04-30-2008, 12:52 AM
Personally, I'm with Steve. I try to avoid buttons where I can.

What? I thought that real programmers avoided menus and splattered buttons all over their worksheets!

Ken Puls
04-30-2008, 09:16 AM
Indeed, Bob. They avoid error handling too. ;)