I accomplished by filling an array with the file names and searching the names in the array. Since my folder will only have the files that I need to work with the file count will be below 10, so this method works fast.
Public Sub ListWorkbooks()
Dim Directory As String
Dim FileName As String
Dim IndexSheet As Worksheet
Dim Count As Long
Dim MyNames() As String
Dim Max As Integer
Dim FileReName As String
Dim temp As String
Dim i As Integer
'Disable Alerts
Application.DisplayAlerts = False
'ReportPath is a constant
Directory = ReportPath
If Left(Directory, 1) <> "\" Then
Directory = Directory & "\"
End If
'Get count of files and redefine array with file count
Max = FileCountA(Directory)
If Max = 0 Then Exit Sub
ReDim MyNames(1 To Max)
Count = 1
'Worksheet used for testing
'Set IndexSheet = ThisWorkbook.ActiveSheet
'Fill Array with file names
FileName = Dir(Directory & "*.xls")
Do While FileName <> ""
'IndexSheet.Cells(Count, 1).Value = FileName
MyNames(Count) = FileName
Count = Count + 1
FileName = Dir
Loop
Count = 1
'Process files and output to workbook for testing
Do While Count <= Max
'IndexSheet.Cells(Count, 1) = MyNames(Count)
'IndexSheet.Cells(Count, 2) = CharterReportFileRename(MyNames(Count))
'Fuction used to process file based on file name
Call MoveAndProcess(Directory, MyNames(Count), CharterReportFileRename(MyNames(Count)))
Count = Count + 1
FileReName = ""
Application.Wait Now + TimeValue("00:00:05") 'used to reduce errors early on, prob not needed now
For Each wb In Workbooks
If wb.Name <> "PERSONAL.XLSB" Then wb.Close False
Next wb
Loop
Set IndexSheet = Nothing
'Enable Alerts
Application.DisplayAlerts = True
Bookmarks