I have used this to list files in folder,
but now want to only list files with do not contain a worksheet "TEST" can anyone help please?
To go one step further I would move the files which do not have worksheet TEST to a new subfolder "NO TEST"
Thanks in advance
***********
Sub List_Files()
Dim MyFolder As String
Dim myFile As String
Dim a As Integer
MyFolder = "C:\CHECK"
myFile = Dir(MyFolder & "*.*")
a = 0
Do While myFile <> ""
a = a + 1
Cells(a, 1).Value = myFile
myFile = Dir
Loop
End Sub
but now want to only list files with do not contain a worksheet "TEST" can anyone help please?
To go one step further I would move the files which do not have worksheet TEST to a new subfolder "NO TEST"
Thanks in advance
***********
Sub List_Files()
Dim MyFolder As String
Dim myFile As String
Dim a As Integer
MyFolder = "C:\CHECK"
myFile = Dir(MyFolder & "*.*")
a = 0
Do While myFile <> ""
a = a + 1
Cells(a, 1).Value = myFile
myFile = Dir
Loop
End Sub