i need to copy first 10 rows from file1 and pasting in file2. i am writing the code as
Dim FNum1 As Integer
Dim FNum2 As Integer
Dim str As String
Open "C:\file1.txt" For Input As #FNum1
Open "C:\file2.txt" For output As #FNum2
Line Input #FNum1, str
Print #FNum2, str
but while opening the second file it gives an error as bad file name or number.
please help me out and let me know how to handle two files simultaneously.