Hi Simon,Originally Posted by Simon Lloyd
It seems that you have some experience with VLookup in VBA, which I have not.
I tried to include the following statements in a Sub:
Dim Konti as Range
Set Konti = Range("Konto_Col")
KontoCol = Application.WorksheetFunction.VLookup(Kontonr, Konti, 2, False)
"Konto_Col" is a 2 column range in the worksheet. "Kontonr" is passed to the sub as an argument.
When running the sub I get the following error message (translation Danish/English might not be exact):
Run time error '1004': Cannot use the property VLookup for the class WorksheetFunction.
Can you or somebody else tell, what is wrong?
Best regards