Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default Check existence of file if file name has a space in it.

I know how to check the existence of a file but what if the file name has a
space in it? For example, "Futures Curves.xls" When I use the
Len(dir(FileName), it is returning 0 for the len.

  #2   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default Check existence of file if file name has a space in it.

Please ignore, I figured it out...

"mc" wrote:

I know how to check the existence of a file but what if the file name has a
space in it? For example, "Futures Curves.xls" When I use the
Len(dir(FileName), it is returning 0 for the len.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Check existence of file if file name has a space in it.

I suspect there's something wrong with 'FileName', the path perhaps; a space
in the file name would not prevent Dir from returning a value.

Regards,
Peter T

"mc" wrote in message
...
I know how to check the existence of a file but what if the file name has a
space in it? For example, "Futures Curves.xls" When I use the
Len(dir(FileName), it is returning 0 for the len.



  #4   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default Check existence of file if file name has a space in it.

Yes, you are correct, I figured that out a few minutes later. Thanks for the
response!

"Peter T" wrote:

I suspect there's something wrong with 'FileName', the path perhaps; a space
in the file name would not prevent Dir from returning a value.

Regards,
Peter T

"mc" wrote in message
...
I know how to check the existence of a file but what if the file name has a
space in it? For example, "Futures Curves.xls" When I use the
Len(dir(FileName), it is returning 0 for the len.




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 File Name Existence in Array Kirk P. Excel Programming 2 June 6th 07 10:10 PM
Check for existence of a file DKS Excel Programming 4 April 9th 07 08:46 PM
Check File Existence Catalin[_2_] Excel Programming 5 May 10th 06 10:20 AM
Test for file existence Joseph[_46_] Excel Programming 1 November 12th 04 08:56 PM
Vba - Checking existence of file ajliaks[_26_] Excel Programming 1 August 11th 04 06:43 PM


All times are GMT +1. The time now is 11:52 AM.

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"