发动机曲轴转角cra:vb问题?????

来源:百度文库 编辑:高校问答 时间:2024/04/28 20:41:08
option explicit
public function ckecknumber(str temp as string)as boolean
check nmber=false
if isnumber (strtemp)=false then
msgbox"此处必须输入数字",vbInformation+vbOKonly
exit function

Option Explicit
Public Function checknumber(strtemp As String) As Boolean
checknmber = False
If Not isnumber(strtemp) Then
MsgBox "此处必须输入数字", vbInformation + vbOKOnly
Exit Function
End Function

把“str temp”和"check nmber"之间的空格去掉即可。
还有就是你的函数名应该是“checknumber”吧? 怎么你却打成“ckecknumber“

option explicit
public function ckecknumber(strtemp as integer)as boolean
checknmber=false
if isnumber(strtemp)=false then
msgbox"此处必须输入数字",vbInformation+vbOKonly
exit function