Function CheckIt (TestMe As Integer)
CheckIt = IIf(TestMe > 1000, "Large", "Small")
End Function
Check 是多少?

解决方案 »

  1.   

    TestMe>1000 : CheckIt="Large"
    TestMe<=1000 : CheckIt="Small"
    TestMe不是数字,出错IIF本来就是要进行判断的,这个问题有点……以后请查MSDN
      

  2.   

    Function CheckIt(TestMe As Integer)
        CheckIt = IIf(TestMe > 1000, "Large", "Small")
    End Function
    'Check 是多少?
    Private Sub Command1_Click()
    MsgBox CheckIt(10)
    '结果是"Small"
    MsgBox CheckIt(2000)
    '结果是"Large"
    End Sub
      

  3.   

    你是不是想阴我?答案:Empty