Worksheet Function VB code error

B

Bob

I am trying to run the following code in a spreadsheet

Heading = Application.WorksheetFunction.VLookup(Leftvalue, Num_Heading, 2, False)

The following error message comes up
Run - time error '1004'
Unable to get the VLookup property of the WorksheetFunction class.

I have tried it with different functions and it still comes up.

Running Excel 2000

Any ideas?
 
J

JE McGimpsey

Is Num_Heading a range? Is LeftValue a value (or a range containing a
value)?

XL97 and MacXL's VLookup doesn't function well as a WorksheetFunction
method. Instead, for these versions, you should use the older
Application.VLookup. I believe this was fixed in XL00, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Vlookup in VBA 4
Vlookup Error 0
VLookup Function in VB 5
VLookup error 4
VLookUp Function 3
VBA userform Vlookup Excel 1
Vlookup macro run time error 8
Vlookup VBA on dates 2

Top