Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox...basic

Status
Not open for further replies.

Yogi39

Technical User
Jun 20, 2001
273
0
0
CA
Basic silly question...how can I pop a list box with Jan, feb, Mar...etc ?
 
Set the listbox rowsource to a sheet range with the months listed.

listbox.rowsource=Data!MonthRange

where MonthRange is a named range that includes 12 rows with the month names in it. Data is the name of the sheet.

I'm sure there's an easier way with a value list where the row source is just "Jan, Feb, etc."


DreamerZ
simplesolutions@prodigy.net
[ignore][/ignore]
 
Thanks DreamerZ

FINALLY found this...*lol*
ListBox1.List = Array("One", "Two", "Three", "Four")
ComboBox1.List = Array("Red", "Green", "Yellow", "Blue")
 
is additem supported in Access? I can't seem to get it to do so on my listbox.

Thx,
Jacqui
 
I must be going nuts because the help I've got refers to 'Adds a list item to the specified command bar combo box control'. I have a normal list box and when I click on a button, I want the selected item to move into another list box. When I use the AddItem method, I get an error saying that the method is not supported.

I can only think that I need to use a different type of listbox other than what comes standard with Access???
 
That's really odd. I created 2 list boxes and added the following code to the AfterUpdate event in the first one. Selecting an item put it in the second list box:
Code:
List51.AddItem (List49.Value)

The 2 list boxes are standard, unbound boxes.

You're putting the AddItem in the VBA module right, not in the Control Source or something? If you're using a button, you'd obviously put the code in the OnClick event of the button.

I can't think of anything else that might be wrong, but it's not the type of list boxes.



DreamerZ
simplesolutions@prodigy.net
[ignore][/ignore]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top