[VB6 ] 請問要怎麼判斷對方輸入的資料的型態?
請問,
要怎麼判斷對方輸入在TXT裡面的東西是數字還是文字啊?
我寫了一個程式,要求對方在文字框中輸入一些數字,
假使數字不對我還知道怎麼判斷,
但是假使對方輸入文字的話,
我該怎麼判斷啊?
本來想說,用val(text1.text)來判斷,假使是0的話,表示對方有可能輸入文字,
但是,這樣也有錯,
假使我要設計的問題中,也要輸入0的話,就無法分辨對方輸入的是文字 還是 0。
看書學的,所以問題很爛QQ
感謝解答
--
"Every kid who has dreamed of being a baseball player has stood in his front
yard with a bat and said to himself, "Bottom of the ninth, Game 7 of the
World Series, the bases are loaded," and then envisioned hitting a home run
to win the game. My job is to shatter that dream."
By Huston Street
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 124.8.97.84
推
01/09 18:23, , 1F
01/09 18:23, 1F
推
01/09 18:29, , 2F
01/09 18:29, 2F
推
01/09 18:30, , 3F
01/09 18:30, 3F
推
01/09 18:33, , 4F
01/09 18:33, 4F
→
01/09 18:35, , 5F
01/09 18:35, 5F
推
01/09 18:52, , 6F
01/09 18:52, 6F
推
01/09 19:53, , 7F
01/09 19:53, 7F
推
01/09 20:44, , 8F
01/09 20:44, 8F
推
01/09 20:46, , 9F
01/09 20:46, 9F
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章