Forum Discussion
AminuF
Jan 10, 2021Copper Contributor
Vba
I have a vba file I am developing for sales transaction. If I run the vba file and I add a product, I get a run-time error 1004, that unable to get the vlookup property of the worksheetfunction class...
JMB17
Jan 10, 2021Bronze Contributor
It's hard to say without seeing the vba code. As a shot in the dark, are you referencing the lookup range as "A1:B10", for example: application.WorksheetFunction.VLookup("x","A1:B10",2,0) which is one way it will fail with the error you are seeing), or are you using a range object, such as Range("A1:B10"), like: application.WorksheetFunction.VLookup("x",range("A1:B10"),2,0)
- AminuFJan 10, 2021Copper Contributorhow do I send the file?
- JMB17Jan 10, 2021Bronze ContributorIf you click on reply, instead of quick reply, you should see where you can attach a file - assuming there is no sensitive information. Otherwise, maybe copy/paste the applicable code. An incorrect argument being passed to the vlookup function may be the problem.
- AminuFJan 10, 2021Copper Contributor