not 是针对 isnumeric的If Not IsNumeric(Text1.Text) Or Val(Text1.Text) < 0 Then 以or为界 前后2个条件 任意满足其中一个为true即执行msgbox如果输入非数字 isnumeric=false not false=true