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

I'm building a custom file import macro to import csv files created by
another program. They are all saved with the file name format of
PartNumber~Machine.csv. I am trying to use the application.filesearch object
to return all the files for a part. I also need to show both the right and
left part numbers. Some example part numbers a

6562 Part 1 Right
6567 Part 1 Left
6561 Part 2 Right
6566 Part 2 Left
6081 Part 3 Right
6091 Part 3 Left
6061 Part 4 Right
6071 Part 4 Left

The problem is when I use wildcards in the .filename property of the
filesearch, it returns part 1 and 2, or 3 and 4. Is there any way to fix
this so it only shows both right and left of the part I want?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default FileSearch filter

Maybe something like

sPart = "Part 1"

..Filename = "?????" & sPart & "*.cvs"

Assumes of course the string length before the part name is known, in your
example 4 numbers and a space (could include that space before the part
name).

Regards,
Peter T



"AdmSteck" wrote in message
...
I'm building a custom file import macro to import csv files created by
another program. They are all saved with the file name format of
PartNumber~Machine.csv. I am trying to use the application.filesearch

object
to return all the files for a part. I also need to show both the right

and
left part numbers. Some example part numbers a

6562 Part 1 Right
6567 Part 1 Left
6561 Part 2 Right
6566 Part 2 Left
6081 Part 3 Right
6091 Part 3 Left
6061 Part 4 Right
6071 Part 4 Left

The problem is when I use wildcards in the .filename property of the
filesearch, it returns part 1 and 2, or 3 and 4. Is there any way to fix
this so it only shows both right and left of the part I want?



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
FileSearch in a combo box michaelberrier Excel Discussion (Misc queries) 0 June 16th 06 12:21 AM
Filesearch in VB6 Colin Charman Excel Programming 3 June 18th 04 04:18 PM
FileSearch Stephen[_6_] Excel Programming 8 June 12th 04 11:14 PM
FileSearch using VBA Mark[_31_] Excel Programming 2 December 24th 03 05:49 PM
.FileSearch Randall[_3_] Excel Programming 4 November 26th 03 01:48 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"