Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP error #NAME bderek95 Excel Discussion (Misc queries) 2 May 20th 10 05:27 PM
Error in VLOOKUP Kris Excel Worksheet Functions 4 May 27th 09 09:51 PM
VLOOKUP error Alfredo Martinez Excel Discussion (Misc queries) 2 October 28th 08 04:46 AM
Vlookup Error mick.smith1964 Excel Worksheet Functions 5 January 13th 05 10:03 PM
using vlookup, but error #N/A ErinGertz Excel Programming 6 December 18th 03 10:31 PM


All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"