Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am searching for files on certain folder, and then, depending on the filename, I want the code to do something specific for these files. I am using a File Name Select Case which is not working. All files should fall into one of the 3 categories of the select case, but they are not. This is my code: Sub FilesUpdate () Dim FName As String Dim Path As String Path = "C:\Pricing\Product1\1st May 2007" With Application.FileSearch .NewSearch .LookIn = Path .FileName = "*.xls" .Execute For i = 1 To .FoundFiles.Count FName = .FoundFiles(i) Select Case FName Case "*GC*" UpdateGCFiles Case "*PL*" UpdatePLFiles Case "*VC*" UpdateVCFiles End Select Next End With End Sub Any suggestions will be highly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select case | Excel Discussion (Misc queries) | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
End Select without Select Case, Block If without End If errors | Excel Programming | |||
Select Case help | Excel Programming |