+ Reply to Thread
Results 1 to 13 of 13

Link active cell to scrollbar and handle percentages

  1. #1
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Link active cell to scrollbar and handle percentages

    Hi everyone!

    I need some help I have a list of percentages from O4 through O21 and I have a scrollbar on the page that is linked to the active cell. Below is the code:
    Please Login or Register  to view this content.
    The only problem I have is not being able to deal with increasing the percentages appropriately. When I hit the button now it jumps the percentage up by 100% with each click and there's no way to adjust the scrollbar to increase it by anything less than 1. I know how to handle this if I only need to update one cell with the scrollbar or if I wanted to update all of the cells at the same time but not independently. Any ideas?

    Just to be more clear. If I'm in cell O15 I may want to increase it by 4% up or down and not have any of the other cells affected. then i might want to jump into O5 and do the same thing with the same scrollbar.

    Thanks in advance!

    Chris

    Thanks!
    Last edited by Cjax; 09-07-2011 at 02:03 PM. Reason: Added Code Tags

  2. #2
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    Thanks for adding the code tags and my apologies for not posting it correctly.

    If anyone has any ideas on how to help I'd be most appreciative! Thanks again!

  3. #3
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    Ok...how about this...does anyone know how I can update the code so that when cells that contain formulas are selected i don't get an error? The error states "Could not set the value property". Which is fine because I don't need those cells controlled by the scroll bar but the error is frustrating.

    Thanks!

    Chris

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Link active cell to scrollbar and handle percentages

    may be sort of that
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    Hey watersev....thanks...that works for the most part. Thank you very much.

    It got rid of the errors for sure. The only thing one has to be aware of is that if you're in a cell with a formula and decide to move the scrollbar anyway it will adjust the last valid cell you were in.

    Thanks again!!

    Chris

  6. #6
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    As an update and question to the moderators. My intial question was not solved so I'm not sure what to do with the thread as I don't want to just leave it. Please let me know how I should handle it.

    Thanks again to all!

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Link active cell to scrollbar and handle percentages

    try this one, it should be fine with the last issue you specified and if cell is not a number:

    Please Login or Register  to view this content.
    Last edited by watersev; 09-07-2011 at 10:51 AM.

  8. #8
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Link active cell to scrollbar and handle percentages

    if there no outstanding issues left, please mark the thread as Solved, see Forum Rules for details:http://www.excelforum.com/forum-rule...rum-rules.html, Rule #9

  9. #9
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    Hey waterserv....I do have another question for you. What if i wanted to restrict the scrollbar to a range of cells? How would i accomplish that?

    Also i tried to add another scrollbar further down on the sheet using the same code but changing the name of the scrollbar to "scrollbar2". I get the following error:
    Ambiguous name detected: Worksheet_SelectionChange

    How can I add a second scroll bar?

    Thanks again

  10. #10
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    Where do i add the range? in between the ""? and should i rename the second "scrollbar1" to scrollbar2?
    If I wanted to attach a range to each scroll bar on the sheet would I just repeat the following?:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    HI does anyone have any idea how to address my last two comments?

    Thanks again for even looking.

    Chris

  12. #12
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Link active cell to scrollbar and handle percentages

    it can done this way, check attachment
    Attached Files Attached Files
    Last edited by watersev; 09-07-2011 at 02:00 PM.

  13. #13
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Link active cell to scrollbar and handle percentages

    That is awesome!!!!

    Thank you sir! or ma'am!

+ 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