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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top