运行提示变量不能用在该表达式何故?(附代码)Enum zimu '定义字母对应数字的枚举型变量A = 1B = 2C = 3D = 4E = 5F = 6G = 7H = 8i = 9J = 10K = 11L = 12M = 13N = 14O = 15P = 16Q = 17R = 18S = 19T = 20U = 21V = 22W = 23X =
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/14 20:56:17
运行提示变量不能用在该表达式何故?(附代码)Enum zimu '定义字母对应数字的枚举型变量A = 1B = 2C = 3D = 4E = 5F = 6G = 7H = 8i = 9J = 10K = 11L = 12M = 13N = 14O = 15P = 16Q = 17R = 18S = 19T = 20U = 21V = 22W = 23X =
运行提示变量不能用在该表达式何故?(附代码)
Enum zimu '定义字母对应数字的枚举型变量
A = 1
B = 2
C = 3
D = 4
E = 5
F = 6
G = 7
H = 8
i = 9
J = 10
K = 11
L = 12
M = 13
N = 14
O = 15
P = 16
Q = 17
R = 18
S = 19
T = 20
U = 21
V = 22
W = 23
X = 24
Y = 25
Z = 26
End Enum
Private Sub Command1_Click()
jhm = Text1.Text
Dim zjhm As String
Dim shuzi As zimu
For i = 1 To 15
shuzi = Mid(jhm,i,0) '顺次读取输入的15个大写字母,并转成数值
zjhm = zjhm & shuzi '把这些数值排列连起来,实现字母转数字
Next i
Text1.Text = zjhm
Print zjhm
End Sub
运行提示变量不能用在该表达式何故?(附代码)Enum zimu '定义字母对应数字的枚举型变量A = 1B = 2C = 3D = 4E = 5F = 6G = 7H = 8i = 9J = 10K = 11L = 12M = 13N = 14O = 15P = 16Q = 17R = 18S = 19T = 20U = 21V = 22W = 23X =
Private Sub Command1_Click()
jhm = Text1.Text
Dim zjhm As String
Dim shuzi As string
For i = 1 To 15
shuzi = cstr(Asc(Mid(jhm, i, 1))-64) '顺次读取输入的15个大写字母,并转成数值
zjhm = zjhm & shuzi '把这些数值排列连起来,实现字母转数字
Next i
Text1.Text = zjhm
Print zjhm
End Sub