Consulting

Results 1 to 2 of 2

Thread: How to add scroll bar in userfrom

  1. #1

    How to add scroll bar in userfrom

    Dear all,

    Here I am in process to create an userform, please see the attached excel file (you need to type Alt+F11 to view the userform)

    In that userform at the top there is a "list box" (ListBox1). This refers to the master list where some avaiable list-item will be there. Now in the 2nd half of that userform, there are a set of list-boxes (I term them secondary list boxes). User needs to select items from master list and then pass the selected items into those list boxes.

    Now I want to put a horizontal scroll bar at the bottom of the userform, this is because the number of secondary list boxes is quite large (in total 5 list boxes should be there), and therefore all the secondary list boxes would not be visible at a point of time.

    Can anyone guide me how to program to make the scroll bar working? It also would be fine if someone guide me how to pass the items from the master listbox to the secondary listboxes.

    Thank you very much

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You don't need to add a scrollbar control.

    Just change the properties of the frame that contains the listboxes.

    in the vbe got to view-properties and change the following properties to:

    keepscrollbarsvisible = 1-fmscrollbarshorizontal
    scrollbar = 1-fmscrollbarshorizontal
    scroll width = 1500

    be sure you have the second frame selected when doing the above and that the properties window says Frame2 in the very top window of the properties list.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •