Sub CheckFileNames()
Dim fso As Object
Dim FileToCheck As Object
Dim FolderToCheck As Object
Dim FolderToCheckPath As String
FolderToCheckPath = "C:\Users\Documents\Excel\Company 2009\"
Set fso = CreateObject("Scripting.FileSystemObject")
Set FolderToCheck = fso.GetFolder(FolderToCheckPath)
For Each FileToCheck In FolderToCheck.Files
If FileToCheck.Name Like "*No Ceiling*" Then
Debug.Print FileToCheck.Name
End If
Next FileToCheck
End Sub
If FileToCheck.Name Like "*No Ceiling*" Then
If [B]UCase([/B]FileToCheck.Name[B])[/B] Like "*[B]NO CEILING[/B]*" Then