With my Excel macro and two text files I want to create a new textfile containing the first textfile then text from the sheet and then the second textfile.
My problem is that i don't know how to append the second textfile.
Followed this:
My problem is that i don't know how to append the second textfile.
Code:
Sub mysub()
Dim TempString As String
'Open the first file
Dim fileA As Integer
fileA = FreeFile()
Open "C:\A\B\C1.txt" For Append As fileA
'Here i will later append stuff from the Excell sheet
TempString = "Hello1"
Print #fileA, TempString
Print #fileA, TempString
'Open the last part of the textfile
Dim EndPart As Integer
EndPart = FreeFile()
Open "C:\A\B\D2.txt" For Input As EndPart
'Here I want to append #EndPart to #fileA
Close EndPart
Close SVGfile
End Sub
Comment