2016-10-24
17:23

root
root

[程序代码]VB_TXT文件分行合并

以下为程序代码


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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49
Else
End If
'
If num.Text = 5 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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49 & vbNewLine & _
line5 & vbNewLine & line51 & vbNewLine & line52 & vbNewLine & line53 & vbNewLine & line54 & vbNewLine & line55 & vbNewLine & line56 & vbNewLine & line57 & vbNewLine & line58 & vbNewLine & line59
Else
End If
'
If num.Text = 6 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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49 & vbNewLine & _
line5 & vbNewLine & line51 & vbNewLine & line52 & vbNewLine & line53 & vbNewLine & line54 & vbNewLine & line55 & vbNewLine & line56 & vbNewLine & line57 & vbNewLine & line58 & vbNewLine & line59 & vbNewLine & _
line6 & vbNewLine & line61 & vbNewLine & line62 & vbNewLine & line63 & vbNewLine & line64 & vbNewLine & line65 & vbNewLine & line66 & vbNewLine & line67 & vbNewLine & line68 & vbNewLine & line69
Else
End If
'
If num.Text = 7 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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49 & vbNewLine & _
line5 & vbNewLine & line51 & vbNewLine & line52 & vbNewLine & line53 & vbNewLine & line54 & vbNewLine & line55 & vbNewLine & line56 & vbNewLine & line57 & vbNewLine & line58 & vbNewLine & line59 & vbNewLine & _
line6 & vbNewLine & line61 & vbNewLine & line62 & vbNewLine & line63 & vbNewLine & line64 & vbNewLine & line65 & vbNewLine & line66 & vbNewLine & line67 & vbNewLine & line68 & vbNewLine & line69 & vbNewLine & _
line7 & vbNewLine & line71 & vbNewLine & line72 & vbNewLine & line73 & vbNewLine & line74 & vbNewLine & line75 & vbNewLine & line76 & vbNewLine & line77 & vbNewLine & line78 & vbNewLine & line79
Else
End If
'
If num.Text = 8 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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49 & vbNewLine & _
line5 & vbNewLine & line51 & vbNewLine & line52 & vbNewLine & line53 & vbNewLine & line54 & vbNewLine & line55 & vbNewLine & line56 & vbNewLine & line57 & vbNewLine & line58 & vbNewLine & line59 & vbNewLine & _
line6 & vbNewLine & line61 & vbNewLine & line62 & vbNewLine & line63 & vbNewLine & line64 & vbNewLine & line65 & vbNewLine & line66 & vbNewLine & line67 & vbNewLine & line68 & vbNewLine & line69 & vbNewLine & _
line7 & vbNewLine & line71 & vbNewLine & line72 & vbNewLine & line73 & vbNewLine & line74 & vbNewLine & line75 & vbNewLine & line76 & vbNewLine & line77 & vbNewLine & line78 & vbNewLine & line79 & vbNewLine & _
line8 & vbNewLine & line81 & vbNewLine & line82 & vbNewLine & line83 & vbNewLine & line84 & vbNewLine & line85 & vbNewLine & line86 & vbNewLine & line87 & vbNewLine & line88 & vbNewLine & line89
Else
End If
'
If num.Text = 9 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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49 & vbNewLine & _
line5 & vbNewLine & line51 & vbNewLine & line52 & vbNewLine & line53 & vbNewLine & line54 & vbNewLine & line55 & vbNewLine & line56 & vbNewLine & line57 & vbNewLine & line58 & vbNewLine & line59 & vbNewLine & _
line6 & vbNewLine & line61 & vbNewLine & line62 & vbNewLine & line63 & vbNewLine & line64 & vbNewLine & line65 & vbNewLine & line66 & vbNewLine & line67 & vbNewLine & line68 & vbNewLine & line69 & vbNewLine & _
line7 & vbNewLine & line71 & vbNewLine & line72 & vbNewLine & line73 & vbNewLine & line74 & vbNewLine & line75 & vbNewLine & line76 & vbNewLine & line77 & vbNewLine & line78 & vbNewLine & line79 & vbNewLine & _
line8 & vbNewLine & line81 & vbNewLine & line82 & vbNewLine & line83 & vbNewLine & line84 & vbNewLine & line85 & vbNewLine & line86 & vbNewLine & line87 & vbNewLine & line88 & vbNewLine & line89 & vbNewLine & _
line9 & vbNewLine & line91 & vbNewLine & line92 & vbNewLine & line93 & vbNewLine & line94 & vbNewLine & line95 & vbNewLine & line96 & vbNewLine & line97 & vbNewLine & line98 & vbNewLine & line99
Else
End If
'
If num.Text = 10 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 & vbNewLine & line45 & vbNewLine & line46 & vbNewLine & line47 & vbNewLine & line48 & vbNewLine & line49 & vbNewLine & _
line5 & vbNewLine & line51 & vbNewLine & line52 & vbNewLine & line53 & vbNewLine & line54 & vbNewLine & line55 & vbNewLine & line56 & vbNewLine & line57 & vbNewLine & line58 & vbNewLine & line59 & vbNewLine & _
line6 & vbNewLine & line61 & vbNewLine & line62 & vbNewLine & line63 & vbNewLine & line64 & vbNewLine & line65 & vbNewLine & line66 & vbNewLine & line67 & vbNewLine & line68 & vbNewLine & line69 & vbNewLine & _
line7 & vbNewLine & line71 & vbNewLine & line72 & vbNewLine & line73 & vbNewLine & line74 & vbNewLine & line75 & vbNewLine & line76 & vbNewLine & line77 & vbNewLine & line78 & vbNewLine & line79 & vbNewLine & _
line8 & vbNewLine & line81 & vbNewLine & line82 & vbNewLine & line83 & vbNewLine & line84 & vbNewLine & line85 & vbNewLine & line86 & vbNewLine & line87 & vbNewLine & line88 & vbNewLine & line89 & vbNewLine & _
line9 & vbNewLine & line91 & vbNewLine & line92 & vbNewLine & line93 & vbNewLine & line94 & vbNewLine & line95 & vbNewLine & line96 & vbNewLine & line97 & vbNewLine & line98 & vbNewLine & line99 & vbNewLine & _
line10 & vbNewLine & line101 & vbNewLine & line102 & vbNewLine & line103 & vbNewLine & line104 & vbNewLine & line105 & vbNewLine & line106 & vbNewLine & line107 & vbNewLine & line108 & vbNewLine & line109
Else
End If
'
'
'
Print #11, item
        'line1 = "": line2 = "": line3 = ""
       ' line1 = "": line11 = "": line2 = "": line21 = "": line3 = "": line31 = ""
        errs = 0
    Loop
e:
    errs = errs + 1
    'If errs < 6 Then Resume Next '三个文件全都读到尾了停止合并,如果只需要一个文件到尾了就停止合并的话把这句去掉
    Close
    
   End Sub

Private Sub Form_Load()
'Text11.Text = App.Path & "\"
Txt1.Text = App.Path & "\0.txt"
Txt2.Text = App.Path & "\0.txt"
Txt3.Text = App.Path & "\0.txt"
Txt4.Text = App.Path & "\0.txt"
Txt5.Text = App.Path & "\0.txt"
Txt6.Text = App.Path & "\0.txt"
Txt7.Text = App.Path & "\0.txt"
Txt8.Text = App.Path & "\0.txt"
Txt9.Text = App.Path & "\0.txt"
Txt10.Text = App.Path & "\0.txt"

End Sub

Private Sub Label3_Click()
Shell "explorer http://www.zlym.cc"
End Sub

Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text1.Text = item
        Txt1.Text = item
        num.Text = num.Text + 1
    Next
End Sub
Private Sub Text2_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text2.Text = item
        Txt2.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text3_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text3.Text = item
        Txt3.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text4_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text4.Text = item
        Txt4.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text5_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text5.Text = item
        Txt5.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text6_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text6.Text = item
        Txt6.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text7_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text7.Text = item
        Txt7.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text8_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text8.Text = item
        Txt8.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text9_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text9.Text = item
        Txt9.Text = item
        num.Text = num.Text + 1
    Next
End Sub

Private Sub Text10_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim item
    For Each item In Data.Files
        Text10.Text = item
        Txt10.Text = item
        num.Text = num.Text + 1
    Next
End Sub


下载地址:http://zlym.net/zb_users/upload/2016/10/20161025182850725072.zip

文章如需转载请注明:转载自: 紫灵幽梦
« 上一篇 下一篇 »

相关文章:

vb读取access并且显示  (2017-5-11 9:18:27)

VB 获取CPU温度示例  (2017-5-8 10:35:11)

VB程序逆向反汇编常见的函数   (2017-5-8 10:32:0)

VB内嵌汇编的模块示例  (2017-5-8 10:24:4)

内存数据的读写(PC)   (2017-3-1 17:51:40)

用VB制作外挂   (2017-3-1 16:16:53)

发表留言: