PC Review


Reply
Thread Tools Rate Thread

distinguishing filenames

 
 
=?Utf-8?B?SkFTZWxlcA==?=
Guest
Posts: n/a
 
      22nd Oct 2007
in Excel 2003
I'm using ...

MyPath = ThisWorkbook.Path & "\"
FilesInPath = Dir(MyPath & "*.ORG.2008BP.xls")

to select files for processing

how would I distinguish between files that are named

#= single numeric character

##.####.ORG.2008BP.xls

and

##.ORG.2008BP.xls

"##.####.ORG.2008BP.xls" didn't work
--
Jim
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      22nd Oct 2007
The simpliest way is to check the legth of the filename

MyPath = ThisWorkbook.Path & "\"
FilesInPath = Dir(MyPath & "*.ORG.2008BP.xls")
if len(FileInPath) = 22 then

else


end if

"JASelep" wrote:

> in Excel 2003
> I'm using ...
>
> MyPath = ThisWorkbook.Path & "\"
> FilesInPath = Dir(MyPath & "*.ORG.2008BP.xls")
>
> to select files for processing
>
> how would I distinguish between files that are named
>
> #= single numeric character
>
> ##.####.ORG.2008BP.xls
>
> and
>
> ##.ORG.2008BP.xls
>
> "##.####.ORG.2008BP.xls" didn't work
> --
> Jim

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3.8 filenames if file select box in xp long filenames appeared in Ernie Windows XP Help 0 18th Oct 2008 05:57 AM
Distinguishing apostrophes =?Utf-8?B?amV6emljYTg1?= Microsoft Word Document Management 12 12th Jun 2006 04:48 PM
Distinguishing Between IE Windows =?Utf-8?B?TmF0aGFuIEJyYWR5?= Microsoft ASP .NET 2 1st Mar 2005 03:47 AM
Distinguishing Name =?Utf-8?B?Q293ZG9nIEdhbA==?= Microsoft Access VBA Modules 1 20th Apr 2004 04:07 AM
call distinguishing Kevin Microsoft Outlook Fax 1 21st Feb 2004 12:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.