Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default distinguishing filenames

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default distinguishing filenames

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
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
In 2007 I am having difficulty distinguishing highlighted areas Bear Black Excel Discussion (Misc queries) 2 November 20th 08 09:31 AM
distinguishing between cell formula, and the resulting text in cell excelnut1954 Excel Programming 1 January 23rd 07 05:36 PM
~~~ Distinguishing Normal; X1.5 and X2 Hours throughout the week by what day and time they are worked ~~~ Corey Excel Programming 0 August 2nd 06 12:37 AM
distinguishing formula cells [email protected] Excel Discussion (Misc queries) 6 June 12th 06 01:10 AM
Distinguishing cell formula from value. buczacz Excel Programming 2 September 23rd 03 07:43 AM


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