Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type Mismatch now, not before
lOutcomesCtyNo = Left(strOutcomes, 2)
I got this line of code in a pervious thread, from Tom Olgivy. Now it won't run, getting a type mismatch. lOutcomesCtyNo is Dimmed as long, strOutcomes is dimmed string. So why is it a type mismatch? I'm trying to get the first 2 characters of strOutcomes, which is a number. Does anyone know? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type Mismatch now, not before
Dave,
That code depends upon the first two characters of strOutcomes being numerice. If not, you'll get a type mismatch. -- HTH RP (remove nothere from the email address if mailing direct) "davegb" wrote in message oups.com... lOutcomesCtyNo = Left(strOutcomes, 2) I got this line of code in a pervious thread, from Tom Olgivy. Now it won't run, getting a type mismatch. lOutcomesCtyNo is Dimmed as long, strOutcomes is dimmed string. So why is it a type mismatch? I'm trying to get the first 2 characters of strOutcomes, which is a number. Does anyone know? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type Mismatch now, not before
Bob Phillips wrote: Dave, That code depends upon the first two characters of strOutcomes being numerice. If not, you'll get a type mismatch. Found the problem. The code actually works, but it's going further down the list than I realized and is hitting a condition I hadn't coded for yet! So it works. Thanks! -- HTH RP (remove nothere from the email address if mailing direct) "davegb" wrote in message oups.com... lOutcomesCtyNo = Left(strOutcomes, 2) I got this line of code in a pervious thread, from Tom Olgivy. Now it won't run, getting a type mismatch. lOutcomesCtyNo is Dimmed as long, strOutcomes is dimmed string. So why is it a type mismatch? I'm trying to get the first 2 characters of strOutcomes, which is a number. Does anyone know? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Type Mismatch | Excel Programming | |||
type mismatch | Excel Programming | |||
Type Mismatch | Excel Programming | |||
type mismatch? | Excel Programming | |||
Type mismatch | Excel Programming |