MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Macro Run Error Without Compiler Error

Posted by Jon Griggs on August 08, 2001 1:02 PM

The line of code in the macro that is giving me a problem is as follows (only during this macro run - no compiler erros when written).

'ActiveCell.FormulaR1C1 = _
' "=IF(ISERROR(HYPERLINK(""[C:\Partsbook\PartsBook.xls] 'Parts Book'!A""&MATCH(A8,'Parts Book'!$A$1:$A20000,0),A8)),"",HYPERLINK(""[C:\Partsbook\PartsBook.xls] 'Parts Book'!A""&MATCH(A8,'Parts Book'!$A$1:$A20000,0),A8))"

This formula works fine if I copy it out of the macro and remove the extra set of quotes around
""[C:\Partsbook\PartsBook.xls] 'Parts Book'!A"".

Anyone see anything blatently wrong?

Extreme Thanks (Once Again),
Jon Griggs

Posted by Ivan F Moala on August 08, 2001 9:18 PM

In your match function I think you need to place in
the full path to your file and not just the file name.