Hi.

I have been attempting to perform a vlookup between 2 sheets and have just encountered the following error message:
Run-Time Error '-2147221080 (800401a8)':
Automation Error

What I am attempting to do is reference an eternal workbook where the information is trimmed and copied and pasted as values to match the destination cells and manually this works. When I try to hard code this using VBA, the error message pops up at the point at which the vlookup code is executed (so the trimming of the cells and copying across works fine).

A cut version of my code is below:

Please Login or Register  to view this content.
Has anyone come across anything like this before? Please note that the external file that the main spreadsheet refers to is extracted from a statistical programming package called SAS, so the file name and tab name appear the same.

Please let me know if you require any further details from me.

Thanks