前面ㄉ程式是以下
Private Sub Command1_Click()
fileno = FreeFile
Open "c:\test.txt" For Output As fileno
For i = 1 To 1000
x = Int(Rnd * 4) + 1
If x = 1 Then
Write #fileno, "A"
ElseIf x = 2 Then
Write #fileno, "B"
ElseIf x = 3 Then
Write #fileno, "C"
ElseIf x = 4 Then
Write #fileno, "D"
End If
Next i
Close #fileno
End Sub
Private Sub Command2_Click()
fileno = FreeFile
Open "c:\test.txt" For Input As fileno
For i = 1 To 1000
Input #fileno, x
List1.AddItem x
Next i
Close #fileno
End Sub
利用Command3計算出A有多少ㄍ
B有多少ㄍ
         C有多少ㄍ
         D有多少ㄍ
  在亂數1000ㄍABCD中
會ㄉ請教我好ㄇ
也可以寄信倒我ㄉ信箱
謝謝~~^^

arrow
arrow
    全站熱搜

    vbqa 發表在 痞客邦 留言(2) 人氣()