VLOOKUP and VBA
Barb,
It is likely that your range name as entered in code does not match your actual named range's name:
because of where it broke in the message, I suspect that you have a space in the name in your code,
which is not allowed. Otherwise, the code should work fine.
HTH,
Bernie
MS Excel MVP
"Barb Reinhardt" wrote in message
...
I thought I posted this, but I can't find it now so it's possible it never
was posted. If it's a duplicate, my apologies.
I have the following equation that's not working and I'm not sure why
CompanyID = Application.VLookup(Target, Range("Statics
Query_from_MS_Access_Database"), 2, False)
I get
runtime error 1004.
Method 'range' of object '_worksheet' failed
I have a named range of Query ... on the Statics worksheet.
Thanks,
Barb Reinhardt
|