20
Декабрь
2008
Как собрать 2 файла в один?
Как собрать 2 файла в один?
'Свойство TextBox Multiline установите в True
Option Explicit
Private Sub Command1_Click()
Dim Str As String
Dim FileNum As Byte
FileNum = FreeFile
Str = Text1.Text
Open App.Path & "\456.txt" For Append As FileNum
Print #FileNum, Str
Close #FileNum
End Sub
Private Sub Form_Load()
Text1.Text = ""
Dim Str As String
Dim FileNum As Byte
FileNum = FreeFile
Open App.Path & "\123.txt" For Binary As FileNum
Str = Space(LOF(FileNum))
Get #FileNum, , Str
Text1.Text = Text1.Text & Str & vbCrLf
Close #FileNum
Open App.Path & "\321.txt" For Binary As FileNum
Str = Space(LOF(FileNum))
Get #FileNum, , Str
Text1.Text = Text1.Text & Str
Close #FileNum
End Sub