2010-06-24 161 views

回答

1

你可以;

Dim str as String 

''always available, what was selected or typed into the box: 
str = TheComboBox.Text 
msgbox "drop down text: " & str 

''for drop-downs, always returns the text of an item: 
if (TheComboBox.ListIndex > -1) then 
    ''something is selected; 
    str = TheComboBox.List(ComboBox1.ListIndex) 
    msgbox "drop down value: " & str 
end if