+ Reply to Thread
Results 1 to 7 of 7

Variable Maximums for Scroll Bars

  1. #1
    Registered User
    Join Date
    07-13-2011
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    7

    Variable Maximums for Scroll Bars

    Greetings,

    Apologies for asking about something which is probably quite easy, but I'm a complete newbie to VBA and am still trying to learn.

    I have to set four Scroll Bars which are conditional on each other, i.e. when a user scrolls on one of them (a percentage figure), the maximums of the other three immediately recalculate to reflect this - their maximums become 100 (%) - the scrolled value.

    I have attached an excel sheet with just these elements, because the total file is quite big and mixed up. I know that the Scroll Bar shapes have to be tweaked through VBA so that their maximum values are set to the four values in Column E (E4:E7), but I have no idea how to do that... Sorry, would be grateful if someone can help.

    Thanks.
    Attached Files Attached Files
    Last edited by muzunova; 07-17-2011 at 06:31 PM.

  2. #2
    Registered User
    Join Date
    07-13-2011
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Variable Maximums for Scroll Bars

    Sorry for bothering again, but I still haven't found a way to solving the problem and was wondering if someone could help...

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

    Re: Variable Maximums for Scroll Bars

    Assign the same macro, SetScroller , to all the scroll bars.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    07-13-2011
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Variable Maximums for Scroll Bars

    That's brilliant! Thank you very much. It works beautifully.

  5. #5
    Registered User
    Join Date
    07-13-2011
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Variable Maximums for Scroll Bars

    I am sorry to return to this issue after it has been solved, but do you think that there is a way to do the same thing (with different code, I presume) with Active-X controls?

    Thanks again!

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

    Re: Variable Maximums for Scroll Bars

    You can put code in the change event of each control

    For scrollbar1
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-13-2011
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Variable Maximums for Scroll Bars

    Thank you again for being so helpful! Works flawlessly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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