ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check if file is excel file (https://www.excelbanter.com/excel-programming/410808-check-if-file-excel-file.html)

Jarle

Check if file is excel file
 
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

Per Jessen

Check if file is excel file
 
Hi

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

Regards,
Per


"Jarle" skrev i meddelelsen
...
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



Jarle

Check if file is excel file
 
Thanks!

Per Jessen skrev:

Hi

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

Regards,
Per


"Jarle" skrev i meddelelsen
...
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





All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com