<?>same dog different sled
Code:
Private Sub Command1_Click()
Dim myVar1 As String, myVar2 As String, myVar3 As String
Open "c:\my documents\text1.Txt" For Input As #1
myVar1 = Input(LOF(1), 1)
Close #1
Open "c:\my documents\text2.Txt" For Input As #1
myVar2 = Input(LOF(1), 1)
Close #1
myVar3 = myVar1 & vbCrLf & myVar2
Open "c:\my documents\text1.Txt" For Output As #1
Print #1, myVar3
Close
End Sub
Thanks guys that worked , but !!!!!!!
That worked a treat , thanks guys. Just one small detail I need to sort. When I copy contents of the second file I would like to lose the header row.so its one big block of data in one file.
ie:
"Name", "address", "age"
"Joe","10 the road","24"
"Joe","20 the road","27"
"Joe","55 the road","67"
"Name", "address", "age"
"mary","10 the road","24"
"bill","20 the road","27"
"ian","55 the road","67"
So to summarise when I read in the second file, I want to ignore the first row ( which is headings)
Please help again guys !
Locutus
Re: Thanks guys that worked , but !!!!!!!
if u used Do while Not Eof(#)
have a Line Input #?, xVAR command before the loop statement