求個很簡單的函數
要求根據Text里的內容返回;
例如:
Text1.text = "a " 函數返回1
Text1.text = "b " 函數返回2
Text1.text = "c " 函數返回3
Text1.text = "d " 函數返回4
[解决办法]
Function ASCOUT( byval S as string) as integer
ASCOUT= Asc(S) - 96
end Function
调用:
msgbox ASCOUT(text1.text)