Check if file is excel file

J

Jarle

I have ha file with filemame FName (that includes the complete path)

If FName is an excel file Then x=A Else x=B

How can I check if FName is an excel file?

rgds
Jarle
 
P

Per Jessen

Hi

If LCase(Right(FName, 3)) = "xls" Then
x = "A"
Else
x = "B"
End If

Regards,
Per
 

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