Vba 类型与单个数据类型不匹配
我需要使用Vba 类型与单个数据类型不匹配,vba,excel,Vba,Excel,我需要使用单一数据类型,但如果输入或-:类型不匹配,则会出现错误 Private Sub TextBox1_Change() Call inputPotential(TextBox1.Value) End Sub Private Function inputPotential(ByRef inputValueSingle As Single) End Function 问题是什么?如何解决 非常感谢 变化 Call inputPotential(TextBox1.Value) 到 只有-或不
单一
数据类型,但如果输入
或-
:类型不匹配,则会出现错误
Private Sub TextBox1_Change()
Call inputPotential(TextBox1.Value)
End Sub
Private Function inputPotential(ByRef inputValueSingle As Single)
End Function
问题是什么?如何解决
非常感谢 变化
Call inputPotential(TextBox1.Value)
到
只有-
或
不是单一类型的数字->计为字符串:)
If IsNumeric(TextBox1.Value) Then Call inputPotential(TextBox1.Value)