程序代码 以下为程序代码
Option Explicit Private Sub Command3_Click() Open Txt1.Text For Input As #1 Open Txt2.Text For Input As #2 Open Txt3.Text For Input As #3 Open Txt4.Text For Input As #4 Open Txt5.Text For Input As #5 Open Txt6.Text For Input As #6 Open Txt7.Text For Input As #7 Open Txt8.Text For Input As #8 Open Txt9.Text For Input As #9 Open Txt10.Text For Input As #10 'If num.Text = 2 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 'Else 'End If ' 'If num.Text = 3 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 'Else 'End If ' 'If num.Text = 4 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 'Else 'End If ' 'If num.Text = 5 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 ' Open Text5.Text For Input As #5 'Else 'End If ' 'If num.Text = 6 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 ' Open Text5.Text For Input As #5 ' Open Text6.Text For Input As #6 'Else 'End If ' 'If num.Text = 7 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 ' Open Text5.Text For Input As #5 ' Open Text6.Text For Input As #6 ' Open Text7.Text For Input As #7 'Else 'End If ' 'If num.Text = 8 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 ' Open Text5.Text For Input As #5 ' Open Text6.Text For Input As #6 ' Open Text7.Text For Input As #7 ' Open Text8.Text For Input As #8 'Else 'End If ' 'If num.Text = 9 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 ' Open Text5.Text For Input As #5 ' Open Text6.Text For Input As #6 ' Open Text7.Text For Input As #7 ' Open Text8.Text For Input As #8 ' Open Text9.Text For Input As #9 'Else 'End If ' 'If num.Text = 10 Then ' Open Text1.Text For Input As #1 ' Open Text2.Text For Input As #2 ' Open Text3.Text For Input As #3 ' Open Text4.Text For Input As #4 ' Open Text5.Text For Input As #5 ' Open Text6.Text For Input As #6 ' Open Text7.Text For Input As #7 ' Open Text8.Text For Input As #8 ' Open Text9.Text For Input As #9 ' Open Text10.Text For Input As #10 'End If Open App.Path & "\" & Text20.Text & ".txt" For Output As #11 '文件地址在当前目录
Dim item As String Dim Line1 As String, line12 As String, line13 As String, line14 As String, line15 As String, line16 As String, line17 As String, line18 As String, line19 As String, line11 As String, Line2 As String, line22 As String, line23 As String, line24 As String, line25 As String, line26 As String, line27 As String, line28 As String, line29 As String, line21 As String, Line3 As String, line32 As String, line33 As String, line34 As String, line35 As String, line36 As String, line37 As String, line38 As String, line39 As String, line31 As String, Line4 As String, line42 As String, line43 As String, line44 As String, line45 As String, line46 As String, line47 As String, line48 As String, line49 As String, line41 As String, line5 As String, line52 As String, line53 As String, line54 As String, line55 As String, line56 As String, line57 As String, line58 As String, line59 As String, line51 As String, line6 As String, line62 As String, line63 As String, line64 As String, line65 As String, line66 As String, line67 As String, line68 As String, line69 As String, line61 As String, line7 As String, line72 As String, line73 As String, line74 As String, line75 As String, line76 As String, line77 As String, line78 As String, line79 As String, line71 As String, line8 As String, line82 As String, line83 As String, line84 As String, line85 As String, line86 As String, line87 As String, line88 As String, line89 As String, line81 As String, line9 As String, line92 As String, line93 As String, line94 As String, line95 As String, line96 As String, line97 As String, line98 As String, line99 As String, line91 As String, line10 As String, line102 As String, line103 As String, line104 As String, line105 As String, line106 As String, line107 As String, line108 As String, line109 As String, line101 As String On Error GoTo e Dim errs As Integer Do Line Input #1, Line1 Line Input #1, line11 Line Input #1, line12 Line Input #1, line13 Line Input #1, line14 Line Input #1, line15 Line Input #1, line16 Line Input #1, line17 Line Input #1, line18 Line Input #1, line19 Line Input #2, Line2 Line Input #2, line21 Line Input #2, line22 Line Input #2, line23 Line Input #2, line24 Line Input #2, line25 Line Input #2, line26 Line Input #2, line27 Line Input #2, line28 Line Input #2, line29 Line Input #3, Line3 Line Input #3, line31 Line Input #3, line32 Line Input #3, line33 Line Input #3, line34 Line Input #3, line35 Line Input #3, line36 Line Input #3, line37 Line Input #3, line38 Line Input #3, line39 Line Input #4, Line4 Line Input #4, line41 Line Input #4, line42 Line Input #4, line43 Line Input #4, line44 Line Input #4, line45 Line Input #4, line46 Line Input #4, line47 Line Input #4, line48 Line Input #4, line49 Line Input #5, line5 Line Input #5, line51 Line Input #5, line52 Line Input #5, line53 Line Input #5, line54 Line Input #5, line55 Line Input #5, line56 Line Input #5, line57 Line Input #5, line58 Line Input #5, line59 Line Input #6, line6 Line Input #6, line61 Line Input #6, line62 Line Input #6, line63 Line Input #6, line64 Line Input #6, line65 Line Input #6, line66 Line Input #6, line67 Line Input #6, line68 Line Input #6, line69 Line Input #7, line7 Line Input #7, line71 Line Input #7, line72 Line Input #7, line73 Line Input #7, line74 Line Input #7, line75 Line Input #7, line76 Line Input #7, line77 Line Input #7, line78 Line Input #7, line79 Line Input #8, line8 Line Input #8, line81 Line Input #8, line82 Line Input #8, line83 Line Input #8, line84 Line Input #8, line85 Line Input #8, line86 Line Input #8, line87 Line Input #8, line88 Line Input #8, line89 Line Input #9, line9 Line Input #9, line91 Line Input #9, line92 Line Input #9, line93 Line Input #9, line94 Line Input #9, line95 Line Input #9, line96 Line Input #9, line97 Line Input #9, line98 Line Input #9, line99 Line Input #10, line10 Line Input #10, line101 Line Input #10, line102 Line Input #10, line103 Line Input #10, line104 Line Input #10, line105 Line Input #10, line106 Line Input #10, line107 Line Input #10, line108 Line Input #10, line109 ' item = line1 & vbNewLine & line11 & vbNewLine & line12 & vbNewLine & line13 & vbNewLine & line14 & vbNewLine & line2 & vbNewLine & line21 & vbNewLine & line22 & vbNewLine & line23 & vbNewLine & line24 & vbNewLine & line3 & vbNewLine & line31 & vbNewLine & line32 & vbNewLine & line33 & vbNewLine & line34 '& vbNewLine ' If num.Text = 2 Then item = Line1 & vbNewLine & line11 & vbNewLine & line12 & vbNewLine & line13 & vbNewLine & line14 & vbNewLine & line15 & vbNewLine & line16 & vbNewLine & line17 & vbNewLine & line18 & vbNewLine & line19 & vbNewLine & Line2 & vbNewLine & line21 & vbNewLine & line22 & vbNewLine & line23 & vbNewLine & line24 & vbNewLine & line25 & vbNewLine & line26 & vbNewLine & line27 & vbNewLine & line28 & vbNewLine & line29 Else End If ' If num.Text = 3 Then item = Line1 & vbNewLine & line11 & vbNewLine & line12 & vbNewLine & line13 & vbNewLine & line14 & vbNewLine & line15 & vbNewLine & line16 & vbNewLine & line17 & vbNewLine & line18 & vbNewLine & line19 & vbNewLine & Line2 & vbNewLine & line21 & vbNewLine & line22 & vbNewLine & line23 & vbNewLine & line24 & vbNewLine & line25 & vbNewLine & line26 & vbNewLine & line27 & vbNewLine & line28 & vbNewLine & line29 & vbNewLine & Line3 & vbNewLine & line31 & vbNewLine & line32 & vbNewLine & line33 & vbNewLine & line34 & vbNewLine & line35 & vbNewLine & line36 & vbNewLine & line37 & vbNewLine & line38 & vbNewLine & line39 Else End If ' If num.Text = 4 Then item = Line1 & vbNewLine & line11 & vbNewLine & line12 & vbNewLine & line13 & vbNewLine & line14 & vbNewLine & line15 & vbNewLine & line16 & vbNewLine & line17 & vbNewLine & line18 & vbNewLine & line19 & vbNewLine & Line2 & vbNewLine & line21 & vbNewLine & line22 & vbNewLine & line23 & vbNewLine & line24 & vbNewLine & line25 & vbNewLine & line26 & vbNewLine & line27 & vbNewLine & line28 & vbNewLine & line29 & vbNewLine & Line3 & vbNewLine & line31 & vbNewLine & line32 & vbNewLine & line33 & vbNewLine & line34 & vbNewLine & line35 & vbNewLine & line36 & vbNewLine & line37 & vbNewLine & line38 & vbNewLine & line39 & vbNewLine & _ Line4 & vbNewLine & line41 & vbNewLine & line42 & vbNewLine & line43 & vbNewLine & line44 & v
已有评论: