Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default type mismatch

hi,

i have the following:

Dim NEWFILE As String
NEWFILE = Range("C" & x).Value
....
Dim test As String
test = Evaluate("LEFT(NEWFILE,FIND(""_"", NEWFILE ,1)-1)")

not sure what is wrong with the syntax

thanks in advance,
geebee


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default type mismatch

Try this
NEWFILE = "" & Range("C" & x).Value & ""

"geebee" wrote:

hi,

i have the following:

Dim NEWFILE As String
NEWFILE = Range("C" & x).Value
...
Dim test As String
test = Evaluate("LEFT(NEWFILE,FIND(""_"", NEWFILE ,1)-1)")

not sure what is wrong with the syntax

thanks in advance,
geebee


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

hi,

i tried:

Dim NEWFILE As String
NEWFILE = "" & Range("C" & x).Value & ""

Dim test As String
test = Evaluate("LEFT(" & NEWFILE & ",FIND(""_""," & NEWFILE & ",1)-1)")
..


still getting same error message

"Mike" wrote:

Try this
NEWFILE = "" & Range("C" & x).Value & ""

"geebee" wrote:

hi,

i have the following:

Dim NEWFILE As String
NEWFILE = Range("C" & x).Value
...
Dim test As String
test = Evaluate("LEFT(NEWFILE,FIND(""_"", NEWFILE ,1)-1)")

not sure what is wrong with the syntax

thanks in advance,
geebee


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default type mismatch

What's in that cell?

What are your trying to accomplish?

VBA has its own left() function and it can use inStr() to inspect strings.

geebee wrote:

hi,

i have the following:

Dim NEWFILE As String
NEWFILE = Range("C" & x).Value
...
Dim test As String
test = Evaluate("LEFT(NEWFILE,FIND(""_"", NEWFILE ,1)-1)")

not sure what is wrong with the syntax

thanks in advance,
geebee


--

Dave Peterson
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: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
TYPE MISMATCH [email protected] Excel Programming 4 April 14th 06 04:10 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Type mismatch ! Roshintosh Excel Programming 7 November 10th 05 07:13 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM


All times are GMT +1. The time now is 08:37 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"