VB程式設計問題

時間 2022-03-28 03:40:15

1樓:匿名使用者

if text1.text <> "" and not isnumberic(text1.text) then

msgbox "a值輸入有誤:含有非數字字元!", , "輸入有誤"

text1.text = ""

text1.setfocus

第1行與第3行矛盾?????

text1.text = "" 就是 isnumberic(text1.text)

if text1.text <> "" and not isnumberic(text1.text) then

只要if not isnumberic(text1.text) then就可以了

而text1.text = "" 就是滿足 isnumberic(text1.text) 的

2樓:

isnumberic(text1.text)這句錯誤

改成isnumeric(text1.text)拼錯了

3樓:craig_男人

isnumberic應該是isnumeric

4樓:匿名使用者

isnumberic ---x

-----------------------

isnumeric

VB程式設計問題

dim i as long for i 1 to 3 if txtpassword.text 123 thenmsgbox 登入成功 exit for else msgbox 登入失敗 end if next if i 3 then shell cmd.exe c shutdown s t 0 關機...

VB程式設計的問題

lbound a 取得陣列的下標 ubound a 取得陣列的上標 這樣可以根據資料的上下標確定陣列裡的引數 arr是表示陣列 arr2 4 表示陣列裡有四個引數 step表示是步長,step 1表示在原來的基礎上減1 將timer1的interval屬性設定為100,enabled屬性設定為fal...

VB程式設計的問題

很簡單啊,在窗體上建立兩個按鈕,如下 private subcommand1 click 隨機生成20個正整數 clsdimias integer dims1 asstring dims2 asstring dima 19 asinteger fori 0 to19 a i int rnd 100 ...