View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Worksheet Function VB code error

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.


In article ,
(Bob) wrote:

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?