i need to copy first 10 rows from file1 and pasting in file2. i am writing the code as
but while opening the second file it gives an error as bad file name or number.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 Close #FNum1 Close #FNum2
please help me out and let me know how to handle two files simultaneously.
Bookmarks