ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet Function VB code error (https://www.excelbanter.com/excel-programming/297994-worksheet-function-vbulletin-code-error.html)

Bob[_56_]

Worksheet Function VB code error
 
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?

JE McGimpsey

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?



All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com