ChangedEdit事件
If e.Col.name = "第一列" Then If e.text.length >= 5 Then Dim d As Double = val(e.text.SubString(4,1)) If d >= 1 AndAlso d<= 3 Then e.Row("第二列") = "开" ElseIf d >= 4 AndAlso d <= 6 Then e.Row("第二列") = "关" Else e.Row("第二列") = Nothing End If End IfEnd If