vb怎樣將text1中輸入字母在text2中自動轉換成數字

時間 2021-07-01 01:21:25

1樓:匿名使用者

private sub text1_change()dim s as string, m as stringfor i = 1 to len(text1.text)m = lcase(mid(text1.text, i, 1))if asc(m) >= 97 and asc(m) <= 122 then

s = s & asc(m) - 96

else

s = s & m

end if

next

text2.text = s

end sub

2樓:匿名使用者

private sub text1_keypress(keyascii as integer)

if keyascii > 64 and keyascii < 91 then

text2 = text2 & keyascii - 64

elseif keyascii > 96 and keyascii < 123 then

text2 = text2 & keyascii - 96

elseif keyascii > 47 and keyascii < 58 then

text2 = text2 & keyascii - 48

end if

end sub

3樓:天天過節

private sub text1_change()for i = 1 to len(text1)t = mid(text1, i, 1)

if asc(ucase(t)) >= 65 then t = ltrim(str(asc(ucase(t)) - 64))

s = s & t

next

text2 = s

end sub

4樓:匿名使用者

text2.text = replace(text1.text, "a", "1")

text2.text = replace(text2.text, "b", "2")

text2.text = replace(text2.text, "c", "3")

text2.text = replace(text2.text, "d", "4")

text2.text = replace(text2.text, "e", "5")

text2.text = replace(text2.text, "f", "6")

text2.text = replace(text2.text, "g", "7")

text2.text = replace(text2.text, "h", "8")

text2.text = replace(text2.text, "i", "9")

text2.text = replace(text2.text, "j", "10")

text2.text = replace(text2.text, "k", "11")

text2.text = replace(text2.text, "l", "12")

text2.text = replace(text2.text, "m", "13")

text2.text = replace(text2.text, "n", "14")

text2.text = replace(text2.text, "o", "15")

text2.text = replace(text2.text, "p", "16")

text2.text = replace(text2.text, "q", "17")

text2.text = replace(text2.text, "r", "18")

text2.text = replace(text2.text, "s", "19")

text2.text = replace(text2.text, "t", "20")

text2.text = replace(text2.text, "u", "21")

text2.text = replace(text2.text, "v", "22")

text2.text = replace(text2.text, "w", "23")

text2.text = replace(text2.text, "x", "24")

text2.text = replace(text2.text, "y", "25")

text2.text = replace(text2.text, "z", "26")

vb中如何把在text1中輸入的資料,從列表框list1中刪除

private sub command1 click for i list1.listcount 1 to 0 step 1 if list1.list i text1.text then list1.removeitem i next end sub 我叫明輝 private sub comman...

中拉丁字母斜體小寫怎樣輸入,WORD中拉丁字母 斜體 小寫 怎樣輸入?

黑道人 斜體在上方的工具欄中點一個斜著的字母i即可 小寫字母麼?只要是英文輸入法就可以了,可以用caps lock鍵切換大小寫,上檔鍵shift和字母鍵同時按下也可以 兔妹無限叼 在系統字型新增你要的字型 word公式編輯器希臘字母如何斜體 用公式來編輯器輸入斜體字源 的操作步驟bai 1 單擊插入...

在excel中怎樣計算,比如在A1中輸入3 5 7,在B1中等於多少

可以使用vb函式evaluate返回答案 選擇資料 名稱管理器 用evaluate填寫引用位置,然後自己選個名字,最後在b1輸入 z1q,也就是你新建的命名 如果你只要計算3 5 7的結果,那隻在a1中就可以顯示了,但excel識別你輸入的是文字還是計算公式,就是前面是否加運算子號 所以你要輸入 3...