sender.text赋多值问题 Post By:2016/6/15 7:46:00 [显示全部帖子]
If e.Sender.Text = "合格" Then e.Form.Controls("DateTimePicker2").Enabled = True ElseIf e.Sender.Text = "差" Then e.Form.Controls("DateTimePicker2").Enabled = False End If
如果以上代码需要两个以上变量判断话怎么写 比如: “合格”,“良好” 和 “差”,“不及格”
我这样写报错,请老师纠正一下
If e.Sender.Text = {"合格","良好}" Then e.Form.Controls("DateTimePicker2").Enabled = True ElseIf e.Sender.Text = {"差","不及格}" Then e.Form.Controls("DateTimePicker2").Enabled = False End If