[求助]如何编写一个自动投票程序
如何编写一个自动投票程序 ?
代码如下
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
e = Len(Text5.Text)
f = Text5.Text
For i = 1 To e
g = Mid(f, i, 1)
If LCase(g) = "a" Then a = a + 1
If LCase(g) = "b" Then b = b + 1
If LCase(g) = "c" Then c = c + 1
If LCase(g) = "d" Then d = d + 1
Next
Text1.Text = "a:" & a
Text2.Text = "b:" & b
Text3.Text = "c:" & c
Text4.Text = "d:" & d
End Sub
[此贴子已经被作者于2005-8-26 9:29:12编辑过]