Consulting

Results 1 to 6 of 6

Thread: Chage background colour

  1. #1

    Chage background colour

    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

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Thanks - didn't even see the visual basic toolbar

  4. #4
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    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.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Ken Puls
    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!
    Last edited by Bob Phillips; 04-30-2008 at 09:19 AM.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Indeed, Bob. They avoid error handling too.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •