worksheet fuction that isn't working ? help


Posted by DENIS on October 29, 2001 8:33 AM

Can you please tell me what is wrong with this vba line

ORETURN = WorksheetFunction.VLookup(NACE_CODE, OADDRESS, 1, 0)


nace_code is a text value which is fine
oaddress is a range which is fine i.e "a1:b50"

The error i'm getting is "unable to get vlookup property of worksheetfunction class"



Posted by Juan Pablo on October 29, 2001 10:30 AM

This problem arises when Vlookup can't find a result (In other words, results in #N/A), and therefor causes the macro to crash

Juan Pablo