Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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



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
Check Excel file for Corruption? dwillman Excel Discussion (Misc queries) 2 February 27th 09 04:58 PM
Check if a sheet exists in a file, without opening that file Bogdan Excel Programming 5 March 9th 07 01:46 PM
code to check file size everytime an Excel file is opened Kaiser[_2_] Excel Programming 2 July 30th 06 05:46 PM
Check to see if excel file has been saved ExcelMonkey Excel Programming 2 July 16th 05 03:38 PM
How to check Excel file already Open Rudy S Excel Programming 2 January 25th 05 02:00 PM


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