PDA

View Full Version : How to add scroll bar in userfrom



arrun
02-13-2010, 08:36 AM
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

lucas
02-13-2010, 10:21 AM
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.