+ Reply to Thread
Results 1 to 3 of 3

Change color of scroll bar on listbox when button clicked

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,749

    Change color of scroll bar on listbox when button clicked

    Hello,
    Is there possible to change the color on the scroll bar when I click the button from the worksheet?

    Please check the Sheet1 where it will show what I am trying to accomplish.
    If you go to "CODE" sheet and click the button you will the scroll bar that has the gray color which I want to change it to red.

    Thank you.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 08-28-2018 at 11:21 AM. Reason: enhanced title

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,457

    Re: Change color of scroll bar on listbox when button clicked

    I don't believe you can using the properties available, but happy to be proved wrong.

    Colours come from Windows setting for controls, so whilst you could alter the colour it will affect all scroll bars.
    If you really need colour you will need to construct your own listbox using other controls and a scrollbar.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Change color of scroll bar on listbox when button clicked

    .
    https://docs.microsoft.com/en-us/win...rs-and-metrics

    Scroll Bar Colors and Metrics
    The system-defined color value, COLOR_SCROLLBAR, controls the color within a scroll bar shaft. Use the GetSysColor function to determine the color of the scroll bar shaft and the SetSysColors function to set the color of the scroll bar shaft. Note, however, that this change of color affects all scroll bars in the system.

+ 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. [SOLVED] Change color of an image when clicked
    By Tpleme in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2017, 08:24 PM
  2. [SOLVED] VBA code to show updated data in the listbox after the data is entered and button clicked
    By chin67326 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-25-2015, 04:23 AM
  3. Way to color row if button or check box is clicked
    By jcmckeon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-14-2014, 07:12 AM
  4. change button colour when clicked
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2012, 02:46 AM
  5. [SOLVED] Change Button name when clicked
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2012, 07:00 AM
  6. [SOLVED] UserForm Command Button - how to make it change appearance when clicked
    By schmidt62 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2012, 10:53 AM
  7. Excel saved as webpage - change links font color when clicked?
    By Elegidos in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 10-14-2009, 05:00 PM

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