+ Reply to Thread
Results 1 to 7 of 7

Can I change the color on the TITLE bar of a UserForm?

  1. #1
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Question Can I change the color on the TITLE bar of a UserForm?

    Howdy Y'all,

    Is there code that would allow me to change the color of a UserForm TITLE bar? I have researched this and haven't found a lot related to it other than using add-ins or 3rd party software. 97% of what I find is about textbox, combobox etc. captions. Using 3rd party software is not an option, add-ins "might be" depending on what the companies IT department will allow.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Can I change the color on the TITLE bar of a UserForm?

    Hi,

    Using WinAPI, you can change the title bar color of ALL WINDOWS (whole system, including the userform), that means, if you change the color of the userform to, lets say red, then all other windows title bar is also changed to red. You can use trick to save the original color of the system title bar color to a variable, change to new color, and when you close the userform, you restore the original color from the variable, like this :

    Userform code :
    Please Login or Register  to view this content.

    Regards

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I change the color on the TITLE bar of a UserForm?

    Thanks Karedog. I did try a similar code but kept getting errors. I'm assuming it's because I am not using WinAPI???? I am not familiar with WinAPI at all. I'll have to look into it more.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Can I change the color on the TITLE bar of a UserForm?

    You are welcome Tom. Please let me know if you still get any trouble about it.


    Regards

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I change the color on the TITLE bar of a UserForm?

    I will. I do have a quick question...is WinAPI and add in?

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Can I change the color on the TITLE bar of a UserForm?

    Quick answer :
    No, WinAPI is not an addin.

    Quite long answer :
    When windows OS is installed in a computer, there are built in libraries (.dll files) also installed.
    These libraries are so important, that almost all programming language call them, directly on indirectly (chained).
    When we call one of procedures stored in these .dll files, it is said that we do a WinAPI call (like we call one of subprocedures in an Excel module).
    So unlike addin that must be installed in every computer that will use some functions/procedures of the addin, there is nothing to be installed when we call WinAPI functions/procedures, because they are built in with the Windows OS.

    More info :
    https://en.wikipedia.org/wiki/Windows_API


    Regards

  7. #7
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I change the color on the TITLE bar of a UserForm?

    Yea, I could have just looked it up myself huh? Thank you for the explanation and the link.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. can i change the color of userform titlebar using vba
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2015, 05:24 AM
  2. Change color for pages in multipage on userform
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2015, 03:27 PM
  3. In Userform how can I change the background color of a Frame
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2014, 12:27 PM
  4. [SOLVED] Value cell change color in userform
    By Danielle22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2013, 05:04 AM
  5. Change color of ellipse on userform
    By Bleekscheetje in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2013, 01:51 PM
  6. Can background color of frame change on userform by combobox selection on userfor
    By teacher_rob in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2011, 05:47 PM
  7. Userform-Change textbox color and font based on input in other tex
    By Neal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2005, 08:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1