求救vb的问题

来源:百度知道 编辑:UC知道 时间:2024/09/20 19:52:17
Private Sub Command1_Click()
Dim a(1 To 26) As Integer, texeLen As Integer
Dim i As Integer, j As Integer, c As String * 1
Lable1.Caption = ""
textLen = Len(Text1)
For i = 1 To textLen
c = UCase(Mid(Text1, i, 1))
If (c >= "A" And c <= "Z") Then
j = Asc(c) - 65 + 1
a(j) = a(j) + 1
End If
Next i
For j = 1 To 26
If a(j) > 0 Then
Lable1.Caption = Lable1.Caption & Chr$(j + 64) & "=" & a(j) & ""
End If
Next j
End Sub

用来统计字母的程序,哪地方错了?高手指点下阿!

我没仔细看你的程序
但我还是瞧见了你写错了几个对象
比如Lable1 瞧仔细了 应该是Label1 才对
还有texeLen 和textLen 是同一个变量吗
这么明显的错误应该自己找出来的
要不然你是学不好的