+ Reply to Thread
Results 1 to 4 of 4

Assigning Min and Max Values to Dependent Scroll Bars

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    14

    Question Assigning Min and Max Values to Dependent Scroll Bars

    Hi all,

    I am totally new to VBA so please be patience with me first. Thanks.

    In this project, I want to devide a string of scores (RawData sheet) into three bands, say Red, Yellow, and Green. I'd like to have the ability to change the cut scores for each band so I set up 2 scroll bars for two cut scores (see attached file). I know that there are several people have asked the similar question about assigning values to scroll bars but I could not make it work after trying several alternatives. My apology if it has be solved before.

    What I want to do is set the minimum value of the 1st bar to be the minimum score in the string and the maximum score of the 1st bar to the minimum score of the 2nd bar. For the 2nd bar, I want to set its minium value to the maximum value of the first bar and the maximum value of the 2nd bar to the maximum value of the string.

    Thanks a lot. I really appreciate your help.

    Best,

    t
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-09-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Assigning Min and Max Values to Dependent Scroll Bars

    Hi all,

    I am still in need for the code. Please help!

    Thanks,
    t

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

    Re: Assigning Min and Max Values to Dependent Scroll Bars

    Use the cells O2:P2 to store min/max values for first scrollbar.
    Use the cells P4 to store max values for second scrollbar.

    Right click sheet tab and click View Code.
    paste this code in sheet code module.

    Please Login or Register  to view this content.
    Your explanation of what the min/max values should be does not make sense. The 2nd Min = 1st Max which is = 2nd Min. You need to define 1 before the other can be the same value.

    The above code will not work if O2:P2 and P4 are based on formula.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-09-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Assigning Min and Max Values to Dependent Scroll Bars

    Thanks Andy. Sorry for delaying in response to this. I found another way around this but your code may be very useful in the future as I worked with these bars a lot.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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