+ Reply to Thread
Results 1 to 6 of 6

How to update scroll bar position where min and max values depend on another cell?

  1. #1
    Registered User
    Join Date
    02-23-2004
    Posts
    64

    How to update scroll bar position where min and max values depend on another cell?

    Hello everybody,

    I found the solution to set a scroll bar activex control with minimum and maximum values based on other cells in this forum link http://www.excelforum.com/excel-gene...croll-bar.html
    i modified it and used the code as following:

    Please Login or Register  to view this content.
    E16 and F16 have formulas to lookup the min & max values of cell B16 in another table.(E16= minimum value & F16 =max value)
    the scroll Bar is linked to cell G29

    The problem is that each time the B16 changes, the scroll bar has to be clicked manually to update/refresh in G29, any way or VBA code to update the scroll bar position as per E16 value every time B16 changes?

    Thank you very much for your help !
    Last edited by gaftalik; 10-14-2019 at 05:04 PM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: How to update scroll bar position where min and max values depend on another cell?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How to update scroll bar position where min and max values depend on another cell?

    Hi there,

    See if the following code does what you need - it must be entered in the VBA CodeModule of the Worksheet which contains the ScrollBar control:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    02-23-2004
    Posts
    64

    Re: How to update scroll bar position where min and max values depend on another cell?

    Thank you very much for your answer.
    Unfortunately i dont know how to write vba codes i just found that one and pasted it as instructed.
    Now i tried to copy your first part of the code at the end and my code page which now looks as follows: (pasted under other vba codes i am using found on the forum)

    Please Login or Register  to view this content.

    Is that good? so far i didnt know how to proceed with the second part of the code you wrote, can i have your instructions please i have no idea how and where to write codes myself, sorry for that!
    I need each time cell B16 changes, the scroll bar position (linked to cell D29) to be at E16 value.

    I appreciate much your time and help!

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: How to update scroll bar position where min and max values depend on another cell?

    @gaftalik
    I think your last post was a duplicate of post #4.
    I "soft deleted " it. If there's any reason it should stay, give me a sign

  6. #6
    Registered User
    Join Date
    02-23-2004
    Posts
    64

    Re: How to update scroll bar position where min and max values depend on another cell?

    Hi,
    I'm sorry, it was a duplicate indeed, i was having problems connecting to the server and later couldn't delete it myself! thank you.

+ 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] ActiveX Scroll Bar changes page position to active cell
    By nwelch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2017, 07:04 PM
  2. Replies: 2
    Last Post: 09-03-2015, 10:33 AM
  3. Replies: 0
    Last Post: 09-05-2014, 11:22 AM
  4. [SOLVED] Insert scroll bar and update cells when clicking on item in scroll bar window
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-10-2014, 03:53 PM
  5. scroll linked cell to upper left position
    By aileron44 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-11-2011, 12:12 PM
  6. automatic group rows depend on cell values
    By yellowpower in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-15-2010, 09:46 AM
  7. How do I set/read the scroll position of a chart
    By Cookstein2 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-22-2009, 10:44 AM

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