事件代码如下 Option Base 1 Dim Arr1(20) As Integer Dim Arr2(20) As Integer Dim a(20) As Integer Sub ReadData1() Open App.Path & "\" & "datain1.txt" For Input As #1 For i = 1 To 20 Input #1, Arr1(i) Next i Close #1 End Sub Sub ReadData2() Open App.Path & "\" & "datain2.txt" For Input As #1 For i = 1 To 20 Input #1, Arr2(i) Next i Close #1 End Sub Sub WriteData(Filename As String, Num As Integer) Open App.Path & "\" & Filename For Output As #1 Print #1, Num Close #1 End Sub Private Sub C1_Click() Call ReadData1 Call ReadData2 End Sub Private Sub C2_Click() For i = 1 To 20 a(i) = Int(Arr1(i) / Arr2(i)) Next i End Sub Private Sub C3_Click() Filename = "dataout.txt" Num = a() Call WriteData(Filename, Num) End Sub 然后要求,和报错界面在图片里
不知道怎么回事,求解~