本示例使用 IIf 函数来计算 CheckIt 过程的 TestMe 参数,并且如果参数值大于 1000 则返回字“Large”;否则返回字“Small”。Function CheckIt (ByVal TestMe As Integer) As String CheckIt = IIf(TestMe > 1000, "Large", "Small")End Function