VLookup in VBA
From: Gjones (anonymous_at_discussions.microsoft.com)
Date: 06/18/04
- Next message: Tom Ogilvy: "Re: dynamic list to remove duplicates and spaces ?"
- Previous message: Tom Ogilvy: "Re: VLookup in VBA"
- In reply to: LarryP: "VLookup in VBA"
- Next in thread: Twoo Doggs: "RE: VLookup in VBA"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 18 Jun 2004 06:45:21 -0700
Hi Larry;
On thing to look at is that in the code below it has
Worksheets(2) which is referring to the sheet by index. I
would try switching it to the actual name such as
WorkSheets("MyWorkSheetName")
Thanks,
Greg
>-----Original Message-----
>Am trying to use the VLookup function in VBA code, and
the
>following line won't run:
>
>intPointValue = Application.WorksheetFunction.VLookup
>(varRawData, Worksheets(2).Range("LFLookup"), 9, True)
>
>I get runtime error 1004, "Unable to get the VLookup
>property of the WorksheetFunction class."
>
>What am I missing? I tried several variations but can't
>seem to make VLookup work, even though the Help says it
>will. Any hints most appreciated.
>.
>
- Next message: Tom Ogilvy: "Re: dynamic list to remove duplicates and spaces ?"
- Previous message: Tom Ogilvy: "Re: VLookup in VBA"
- In reply to: LarryP: "VLookup in VBA"
- Next in thread: Twoo Doggs: "RE: VLookup in VBA"
- Messages sorted by: [ date ] [ thread ]