Type Record
ID As Integer
Name As String * 20
End Type
Sub AddendFile()
' TEST1 = Master File
' TEST2 = Add-on File
Dim MyRecord As Record
Dim RecordNumber
Dim MaxSize
ChDir "C:\Users\Steve\ftp\Beta"
Open "TEST1.xlsm" For Random As #1 Len = Len(MyRecord)
Open "TEST2.xlsm" For Random As #2
MaxSize = Len(MyRecord) ' Get number of records in master.
For RecordNumber = 1 To 3 'Number of new records to place in master
Position = MaxSize + RecordNumber - 1
Seek #1, Position ' Put pointer at end of master
Seek #2, RecordNumber ' Put pointer at beginning of add-on
Get #2, , MyRecord ' Read record in add on
'********************************************************************************************************
Put #1, Position, MyRecord ' Place record at end of master 'ERROR 75 FILE/PATH ACCESS ERROR
'********************************************************************************************************
Next RecordNumber
Close #1
Close #2
End Sub
The above code generates error 75. Need to know how to work around.
I have two workbooks
TEST1.xlsm = Master file that has in column A the numbers 1 through 21
TEST2.xlsm = A file that contains new data (A,B.C) to be appended to TEST1.xlsm
I want Test1 to read vertically in column A 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,A,B,C
The error stops me from meeting my goal.
Bookmarks