Excel VBA运行时错误“13”types不匹配时,值不是数字
我有下面的代码返回一个不匹配的错误,当数值不是数值。 我会改变什么?
If Sheet3.Cells(4, 8).Value <= 182 Then Call ThreeSpells End If
提前致谢 :)
像这样的东西
Dim MyVar, MyCheck MyVar = Sheet3.Cells(4, 8).Value MyCheck = IsNumeric(MyVar) 'Returns True If MyCheck = True Then If Sheet3.Cells(4, 8).Value <= 182 Then Call ThreeSpells End If Else 'msgbox or what you want End If