View Single Post
Old 17-Apr-2007, 06:12 AM   #2 (permalink)
Iphone
Fixed Error!
 
Iphone's Avatar

Posts: 4,202
Join Date: Mar 2007
Rep Power: 6 Iphone is on a distinguished road

IM:
Default Re: Need help for VBA beginner

<<and Vista>>

Where abouts - don't tell me it's only on the new site or I'll scream

Matrice1, could you describe your question a little better. I use VB6 which is very similar to VBA.

If you're a complete beginner in VB, then what you want to do is get a book or read up on the net about the different controls and their main properties and events.

I'll run through a few of these off the top of my head (assuming control is called cbo1 - cbo is the standard prefic we use when naming a combo-box)

cbo1.AddItem "some string value" - programmatically add a new item to the list which is seen when you srop-down the list.
cbo1.RemoveItem (IndexNumber) - remove an item. to remove selected item when app is running type: cbo1.RemoveItem (cbo1.ListIndex)
cbo1.ListIndex - the index/number value of the currently selected item
cbo1.ListCount - how many items in list
cbo1.List (IndexNumber) - the "text" of an item in the list - specefied by an index value
cbo1.Clear - deletes everything in the list
Iphone is offline   Reply With Quote