一个窗体中有好几个combobox,如何在前一个combobox没有内容之前禁用,有了内容就恢复,我用的判断
If Trim(Combo1.Text = "") Then
Combo2.Enabled = False
Else
Combo2.Enabled = True
End If
禁用是可以,但是有了内容也启用不了,我是新手,希望高手多多指教!
If Trim(Combo1.Text = "") Then
Combo2.Enabled = False
Else
Combo2.Enabled = True
End If
禁用是可以,但是有了内容也启用不了,我是新手,希望高手多多指教!
If .ListCount > 0 Then
.Enabled = True
End If
End With
With cbo
Debug.Print .ListCount
.AddItem "aaa"
Debug.Print .ListCount
If .ListCount > 0 Then
.Enabled = True
End If
End With