Private Sub Combo1_Click() If Combo1.ListIndex = 0 Then Frame1.Enabled = True End If End Sub
或者你把你要做的咚咚全部放在一个函数里面,通过combo的点击把listindex传进去做select case Private Sub Combo1_Click() call Control(combo1.listindex) End Subprivate sub Control(index) select case index case 0 text1.………… case 1 frame………… case 2 ………… …… …… end select end sub
If Combo1.ListIndex = 0 Then
Frame1.Enabled = True
End If
End Sub
Private Sub Combo1_Click()
call Control(combo1.listindex)
End Subprivate sub Control(index)
select case index
case 0
text1.…………
case 1
frame…………
case 2
…………
……
……
end select
end sub