Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using vLookup function in VBA
I'm an Access programmer, venturing into Excel VBA.
I have a form that contains a text value ("1.1.6") that is one of many values in my TaskInfo Worksheet. I want to use Vlookup to get the values in the 2nd, 3rd, and 4th columns of this worksheet, but cannot seem to make it work. My code segment looks like: Dim lookupRange as range set lookupRange = Worksheets("TaskInfo").Range("A2:A200") me.text2.Value = application.worksheetfunction.vlookup("1.1.6", lookupRange, 2) But this generates a runtime error 1004: Unable to get the Vlookup property of the WorksheetFunction class When set the lookupRange in the Immediate window, I am able to debug.print lookupRange(1), etc, so I know the range is defined properly, but have know idea why I am getting this error message. Any help would be greatly appreciated. -- Email address is not valid. Please reply to newsgroup only. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to combine Combo Box function with Vlookup function | Excel Worksheet Functions | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION | Excel Worksheet Functions | |||
how do I write a vlookup function within an iserror function so t. | Excel Worksheet Functions | |||
I want to use Vlookup function and AND function in a single formu. | Excel Worksheet Functions |