Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default 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
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 Raman325[_4_] Excel Programming 1 June 29th 05 06:51 PM
type mismatch Donnie Fuqua Excel Programming 2 June 28th 05 03:29 AM
Type Mismatch Brad Excel Programming 2 May 2nd 05 04:49 PM
type mismatch? Gixxer_J_97[_2_] Excel Programming 4 April 1st 05 03:20 AM
Type mismatch Stuart[_5_] Excel Programming 4 February 19th 04 07:54 PM


All times are GMT +1. The time now is 03:43 PM.

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"