Private Sub Command1_Click()
试试
Dim temp As String
Dim x As String
Dim i As Integer
Dim sum As Integer
temp = Text1.Text
For i = 1 To Len(temp)
x = Mid(temp, i, 1)
If Asc(x) >= 48 And Asc(x) <= 57 Then sum = sum + Asc(x) - Asc(0)
Next
Form1.Caption = sum
End Sub
Private Sub Command1_Click()
Dim i As Integer
Dim n As Integer
For n = 0 To 9
Text1(n).Text = n + 1
If Text11(n).Text = 0 Then Exit For
Next n
For i = 0 To 9
If Text21(i).Text = "*" Then Text11(i).ForeColor = vbRed
If Text21(i).Text = "#" Then Text11(i).ForeColor = vbGreen
Text32.Text = Text31.Text & "股道" & Chr(13) & Chr(10) & Text11(0).Text & Text11(1).Text & Text11(2).Text & Text11(3).Text & Text11(4).Text & Text11(5).Text & Text11(6).Text & Text11(7).Text & Text11(8).Text & Text11(9).Text
Next i
End Sub