View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Merkling, Steven Merkling, Steven is offline
external usenet poster
 
Posts: 17
Default vblookup and type mismatch

It is my guess that intWhichArrayRow is over 32,767 so it would have to be dimed as a double not an integer.

HTH
-Merk

11/25/03 03:39PM

Whoops...I've been staring at the screen to long, I
think. The subject of this post should be "vlookup",
not "vblookup"


-----Original Message-----
HELP!!! I've checked everything I can think of, and I
have no idea why this isn't working. Can anyone help

me?
I have a line of code that's giving me a Type Mismatch
error. It reads as follows:

intWhichArrayRow = Application.WorksheetFunction.VLookup
(strWhereGraph & strGraphNum & ".tif", varGraphCheckList,
2, False)

Using the Locals & Immediate windows, plus the
basic "hover method", I have verified that:

strWhereGraph = "Q:\1COM_ART\MAS\" (this one's a public
variable from another module)
strGraphNum = "TP0001" (String)
varGraphCheckList is a variant array (Variant(1 to 9255,

1
to 4))
varGraphCheckList(8901,1) = "Q:\1COM_ART\MAS\TP0001.tif"
(Variant/String)
varGraphCheckList(8901,2) = 8901 (Variant/Integer)
varGraphCheckList(8901,3) = 0 (Variant/Integer)
varGraphCheckList(8901,3) = "" (Variant/String)
intWhichArrayRow = 0 (Integer)

.