COMBOX如何获得选中值
FCARM 2009-07-11 09:25:46 现在此写了一个小的程序,发现用COMBOX的时候,选中时,没出出现自己想要的效果
代码如下:
Dim num As Integer
Private Sub com_Change()
If com.Text = "s1" Then
'lab.Caption = com.Text
End If
if com.Text ="s2" then
lab.Caption = com.Text
if com.Text = "s3" then
lab.Caption = "s3"
lab.Caption = com.Text
End Sub
Private Sub Form_Load()
With com
.AddItem "s1"
.AddItem "s1"
.AddItem "s3"
End With
end sub
我想选择中S1就显示S1选中S2就显示S2
但选中的时候,并没有显示,请大家指示!