If year.Text = "" Or year.Text <= 2002 Or year.Text >= 2099

解决方案 »

  1.   


    If year.Text = "" And CINT(year.Text) <= 2002 And CINT(year.Text) >= 2099 Then
            MsgBox " 输入正确的赛事年份"
            Exit Sub
    Else
        years = year.Text
    End If
      

  2.   

    If year.Text = "" And year.Text <= 2002 And year.Text >= 2099 Then
    你的意思好像应该是:
    If year.Text = "" or year.Text <= 2002 or year.Text >= 2099 Then
      

  3.   

    先判断year.text ="",如果是True,则MsgBox " 输入正确的赛事年份";
    如果是False则判断 CINT(year.Text) <= 2002 Or CINT(year.Text) >= 2099 的True或者False
      

  4.   

    Dim num As Integer, max As Integer, i As Integer, my As String, years As StringIf year.Text = "" or year.Text <= 2002 or year.Text >= 2099 Then
            MsgBox " 输入正确的赛事年份"
            Exit Sub
    Else
        years = year.Text
    End If
    用or
      

  5.   

    If (year.Text = "") or (year.Text <= 2002 and year.Text >= 2099) Then