Help using ListBox in VBA

A

Ayo

Does anybody knows where I can find help on using Listbox to display results
from a filter operation in Excel 2007. I want to run some filters in excel
and I want to display the results in a control Userform Listbox. And I also
want to be able to format the values in the Listbox.
If anyone can point me to a good source of information on how to accomplish
this, I will be very greatful.
Thanks
Ayo
 
R

ryguy7272

Add a list box (Form control)
1. If the Developer tab is not available, display it.
Display the Developer tab
A. Click the Microsoft Office Button, and then click Excel Options.
B. In the Popular category, under Top options for working with Excel, select
the Show Developer tab in the Ribbon check box, and then click OK.
NOTE The Ribbon is a component of the Microsoft Office Fluent user
interface.
2. On the Developer tab, in the Controls group, click Insert, and then under
Form Controls, click List box.


HTH,
Ryan---
 
J

JLGWhiz

I don't know of a place where you can get all of the possible variations of
using filtered data to populate a list box. You could use the visible cells
to create an array from which you could use the add item method or the list
method to populate the control. You can also copy the filtered range to a
permanent range in the worksheet and use the ListFillRange or RowSource
property to populate the control. Then the control must be defined as
single or multi column and as single or multi-select. And a couple of other
options.

I would suggest that you use the VBA help files to start with and try to
develop a procedure from the information you get from those tools. When you
get something put together, post back, for help from the newsgroup and post
what you have tried with an explanation of what your goal is. Someone here
will help you along.
 
A

Ayo

Thanks, this is very helpful.

JLGWhiz said:
I don't know of a place where you can get all of the possible variations of
using filtered data to populate a list box. You could use the visible cells
to create an array from which you could use the add item method or the list
method to populate the control. You can also copy the filtered range to a
permanent range in the worksheet and use the ListFillRange or RowSource
property to populate the control. Then the control must be defined as
single or multi column and as single or multi-select. And a couple of other
options.

I would suggest that you use the VBA help files to start with and try to
develop a procedure from the information you get from those tools. When you
get something put together, post back, for help from the newsgroup and post
what you have tried with an explanation of what your goal is. Someone here
will help you along.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top