Excel 2013 on W10: VBA Vlookup in a different worksheet produces error 1004
<p>I'm developing an application which uses specification codes to vlookup those codes in another spreadsheet, and return vendor numbers from the second spreadsheet to the first, listing them in the same column with the specification code.  </p>

<pre><code>ActiveCell.FormulaR1C1 = Application.WorksheetFunction.VLookup(specsec, [Vendorspec.xlsx!vid], 4)
</code></pre>

<p>in the above code line:</p>

<ul>
<li>specsec is the specification code, of the form XX XX XX.XX</li>
<li>The name of the vlookup target file is "VendorSpec.xlsx".  In this worksheet, each code is a unique entry in column 1, with the first of several vendor numbers in column 4.  Future code will cycle through the columns, returning all subsequent vendor IDs for the current code. </li>
</ul>

<p>The code line produces error "Run-time error '1004': Unable to get the vlookup property of the worksheet function class".</p>

<p>Can anyone suggest a fix?</p>

<p>Thank you.</p>