Was wondering if anyone could help me out with a Macro someone wrote me to extract address info from some excel invoices I have. Unfortunately I know virtually nothing about Excel programming (apart from some VB programming in high school) so do not know how to sort this run-time error.
The guy who wrote the Macro said it works fine on his machine with Office XP but I am unable to get it to run on either of the Office 2000 machines I have tried (sorry, don't want to to use Office XP, found it terrible ). The macro runs so that it extracts the info in cells E11-E15, then moves onto the next file - unfortunately it comes up with the 'run time error 1004' saying that the 1st file in the sequence cannot be found.
Could anyone shed any light on this? Here is the code:
TIA
The guy who wrote the Macro said it works fine on his machine with Office XP but I am unable to get it to run on either of the Office 2000 machines I have tried (sorry, don't want to to use Office XP, found it terrible ). The macro runs so that it extracts the info in cells E11-E15, then moves onto the next file - unfortunately it comes up with the 'run time error 1004' saying that the 1st file in the sequence cannot be found.
Could anyone shed any light on this? Here is the code:
Code:
Sub GetTheDetails()
Linecount = 0
For Each c In Range("Filenames")
If Trim(c) <> "" Then
Linecount = Linecount + 1
Row = Linecount + 4
t3 = "C" & Trim$(Str$(Row)) & ":" & "G" & Trim$(Str$(Row))
Workbooks.Open c, , ReadOnly
Range("E11:E15").Copy
Workbooks("endsupinhere.xls").Activate
Range(t3).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Next
End Sub
TIA