LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Vlookup of VBA Array

I am trying to do a Vlookup on a 2D VBA array that I created. The
array named SheetExcludeArray has been defined as a Public variable.
I have loaded sheet names into the first column of the array and
values in the other column. Later on in my routine, I want to
retrieve the values in the second column. As follows:

Sheet 1 1
Advanced Ouput 1
Sheet 3 0

I am gettng a 1004 Error stating "Unable to get Vlookp property of the
Worksheet Function".

The line of code I am using is:
Application.WorksheetFunction.Vlookup(sh.Name,Shee tExcludeArray,2,0)

However when I go to the Immediate Window I get this:

?SheetEXcludeArray (0,1)
Advanced Output

? SheetEXcludeArray (1,1)
1

?sh.Name
Advanced Ouptut

What doest the 1004 error imply? My immediate window tells me the
array has values in it and that my variable has a sheet name passed to
it. What could be wrong here?

Thanks
 
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 or Array or neither Rob Excel Discussion (Misc queries) 4 May 26th 09 03:06 PM
VLOOKUP & Array AlanR Excel Worksheet Functions 8 April 1st 09 02:48 AM
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
vlookup with a sum of array Jerry (the latin men) Excel Worksheet Functions 5 January 17th 07 02:31 AM
VLOOKUP ARRAY Dave Excel Discussion (Misc queries) 2 November 21st 06 04:08 PM


All times are GMT +1. The time now is 08:04 AM.

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

About Us

"It's about Microsoft Excel"