Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup error
I'm using very simple Vlookup function that is working very well in a
spreadsheet but in VB it says unable to get Vlookup property in WorksheetFunction class. Set rngLogIn = Worksheets("Main").Range("A9") varName = Application.WorksheetFunction.VLookup(rngLogIn, LoginName, 3, False) Can anybody help? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup error
Thanks, I've already fixed it.
"Alex" wrote: I'm using very simple Vlookup function that is working very well in a spreadsheet but in VB it says unable to get Vlookup property in WorksheetFunction class. Set rngLogIn = Worksheets("Main").Range("A9") varName = Application.WorksheetFunction.VLookup(rngLogIn, LoginName, 3, False) Can anybody help? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup error
I'd assume that you changed rngLogIn to rngLogIn.Value in the function call?
alternative dim login as string LogIn = Worksheets("Main").Range("A9").Value varName = Application.WorksheetFunction.VLookup(LogIn, LoginName, 3, False) note that if there's no match then VLookup raises an error which you'll need to handle too. "Alex" wrote: Thanks, I've already fixed it. "Alex" wrote: I'm using very simple Vlookup function that is working very well in a spreadsheet but in VB it says unable to get Vlookup property in WorksheetFunction class. Set rngLogIn = Worksheets("Main").Range("A9") varName = Application.WorksheetFunction.VLookup(rngLogIn, LoginName, 3, False) Can anybody help? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLOOKUP error #NAME | Excel Discussion (Misc queries) | |||
Error in VLOOKUP | Excel Worksheet Functions | |||
VLOOKUP error | Excel Discussion (Misc queries) | |||
Vlookup Error | Excel Worksheet Functions | |||
using vlookup, but error #N/A | Excel Programming |