+ Reply to Thread
Results 1 to 3 of 3

Scrollbar - Linking to a Combobox

  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Scrollbar - Linking to a Combobox

    On a userform, is there a way in which to set a scrollbar's slider postion to the ListIndex value of the item chosen in a ComboBox?

    In other words, if the total ListCount for this choice is is ten, and the item chosen in the Combobox is in the fourth position, can the scrollbar slider automatically be set to the fourth position rather than be all the way to the left or right?

    I would think that this would make it visually easier for the user to understand in which direction they can scroll the list.

    Here's what I've got so far:

    Please Login or Register  to view this content.
    I've attached an example workbook for reference

    Thanks in advance.
    Attached Files Attached Files
    Last edited by max57; 10-31-2009 at 05:27 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Scrollbar - Linking to a Combobox

    The use of the line...

    Please Login or Register  to view this content.
    at the end of ComboBox1_Change() might help. I couldn't grasp completely what you are trying to acheive, especially as you had code which was triggered by change in the value of ScrollBar1 which appeared to reset its maximum.
    Martin

  3. #3
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Scrollbar - Linking to a Combobox

    Martin,

    Thanks for the helpful hints.
    I made a few slight changes as you can see and I placed the code in the Combobox2 sub.

    Please Login or Register  to view this content.
    I've attached the revised workbook to illustrate the changes.
    I've learned some new tricks to place in my toolkit.
    Thanks Again!

    Mark Mace
    Attached Files Attached Files

+ 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