List Box using VBA


Posted by Kris on January 09, 2002 9:00 PM

Using VBA, how can I change the value in the listbox to a valid member in the list.

In other words, at one point in my VBA script, I always want the value of my list box to be a certain member of the list. For instance, if my list contains, "Jan","Feb","Mar", before I continue processing, i need to change the value to "Jan".

Thanks for your help.



Posted by Gil on January 09, 2002 9:18 PM


If i understand you correctly you want to put for example the "Jan" value to a constant, double click on the list box and then at the "listbox_change" or "click" function type the name of your constant, for example: MyMonth=listbox1.text and then continue with the code...

Gil.