Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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)

.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default vblookup and type mismatch

No, the results of the vlookup being assigned to
intWhichArrayRow should be = 8901

You do bring up a good point, though. I should probably
rewrite things so that things will still work in case I
ever DO search a folder structure that contains more than
32,767 files.

As for correctly dimming my variables, that was one of the
first things I checked on. I tried taking the vlookup
straight to debug.print without even going through a
variable & got the same error.

-----Original Message-----
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)

.



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default vblookup and type mismatch

Is varGraphCheckList

An Excel Range?

-Merk

11/25/03 04:54PM

No, the results of the vlookup being assigned to
intWhichArrayRow should be = 8901

You do bring up a good point, though. I should probably
rewrite things so that things will still work in case I
ever DO search a folder structure that contains more than
32,767 files.

As for correctly dimming my variables, that was one of the
first things I checked on. I tried taking the vlookup
straight to debug.print without even going through a
variable & got the same error.

-----Original Message-----
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)

.



.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default vblookup and type mismatch

No, it is a variable array:

Dim varGraphCheckList() As Variant
ReDim varGraphCheckList(LBound(varGraphFileList) To UBound
(varGraphFileList), 1 To 4) As Variant
For intThisArrayRow = LBound(varGraphFileList) To UBound
(varGraphFileList)
varGraphCheckList(intThisArrayRow, 1) =
varGraphFileList(intThisArrayRow)
varGraphCheckList(intThisArrayRow, 2) = intThisArrayRow
varGraphCheckList(intThisArrayRow, 3) = 0
varGraphCheckList(intThisArrayRow, 4) = ""
Next intThisArrayRow



-----Original Message-----
Is varGraphCheckList

An Excel Range?

-Merk

11/25/03

04:54PM
No, the results of the vlookup being assigned to
intWhichArrayRow should be = 8901

You do bring up a good point, though. I should probably
rewrite things so that things will still work in case I
ever DO search a folder structure that contains more than
32,767 files.

As for correctly dimming my variables, that was one of

the
first things I checked on. I tried taking the vlookup
straight to debug.print without even going through a
variable & got the same error.

-----Original Message-----
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)

.



.



.

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
Type Mismatch Error Minitman Excel Discussion (Misc queries) 7 June 21st 08 02:15 AM
Type mismatch... George[_4_] Excel Discussion (Misc queries) 7 December 19th 07 12:20 PM
Type Mismatch [email protected] Excel Worksheet Functions 1 May 16th 07 03:29 PM
type mismatch--how to fix rroach Excel Discussion (Misc queries) 2 July 14th 05 06:23 PM


All times are GMT +1. The time now is 12:02 PM.

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"