也就是说TextBox内只能输入0.00字样模式的(即金钱,精确到分)。
这个检测可以放在change或者button的click事件中。

解决方案 »

  1.   

    private sub text1_lostfocus()
        if trim(text1.text)="" then
            msgbox "请输入!",48,"提示"
            text1.setfocus
            exit sub
        else
            if not isnumeric(text1.text) then
                msgbox "请输入数值型数据!",48,"提示"
                text1.setfocus
                exit sub
            else
                text1.text=format(text1.text,"standard")
            end if
        end if
    end sub 
      

  2.   

    谢谢 Leftie(左手,为人民币服务) ,有问题再问:)