type mismatch

G

geebee

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
 
G

geebee

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
 
D

Dave Peterson

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.
 
Top