not sure why that is, but i think it has something to do with either the do loop, if statement, or Dir function. try making the changes that i highlighted with the "+" symbol.
Code:
Sub Get_Dealer_Count()
'Define Variables
'Const strFldr As String = "Path2"
Dim strTemplate As String
Dim strFldr As String
'++++++++++++++++++++++++++++++++++++++++++++++++++
'no longer a need for this varaible
'''' Dim strFile As String
'++++++++++++++++++++++++++++++++++++++++
Dim wbExtractSize As Workbook
Dim wbCsv As Workbook
Dim wsDealerExtracts As Worksheet
Dim wsMyCsvSheet As Worksheet
Dim lNextRow As Long
Dim FH As New clsFileHandler
'set strFldr variables
strFldr = "C:\Production2\ATX\Extracts\201001"
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++
'''''set strFile variables
'''' strFile = Dir(strFldr & "\*.csv")
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
strTemplate = "Extract_Size_Checker_template.xls"
'set the calculation mode
Application.Calculation = xlCalculationManual
'set the workbook and worksheet
Set wbExtractSize = Workbooks.Open("C:\Documents and Settings\SeymourJ\Desktop\Tasks\MacroTask\" & strTemplate)
Set wsDealerExtracts = wbExtractSize.Sheets("Dealer Extracts")
'find the next row available in ExtractSize, add two to
lNextRow = 18
'--------------------------------------------------------------------------------------------------------------------
'this should put all the file names with paths on your "dealer extracts" sheet. you may have to adjust the target cell
'--------------------------------------------------------------------------------------------------------------------
FH.ClearPreviousSearch wsDealerExtracts
FH.GetAllFiles "C:\Production2\ATX\Extracts\201001\", wsDealerExtracts.Range("F18")
'Loop through the csv files
'------------------------------------------------------------------------------------
'the following if statement will always evaluate to true, so it's uneccesary
''''If Len(strFile) > 0 Then
'-------------------------------------------------------------------------------------
Do
'---------------------------------------------------------------------------------------------------------------
'i moved the with statement up so that the open parameter would be included. you may need to adjust the cell from
'which it looks for the file name
'-----------------------------------------------------------------------------------------------------------------
With wsDealerExtracts
Set wbCsv = Workbooks.Open(Filename:=.Cells(lNextRow, 6))
Set wsMyCsvSheet = wbCsv.Sheets(1)
'------------------------------------------------------------------------------------
'no longer any need for this as it's already been put in by the clsFileHandler object
''''.Cells(lNextRow, 6) = strFldr
'------------------------------------------------------------------------------------
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'we'll have to address this issue next
'''' .Cells(lNextRow, 7) = strFile
'+++++++++++++++++++++++++++++++++++++++++++++++++
.Cells(lNextRow, 8) = WorksheetFunction.CountA(wsMyCsvSheet.Range("A:A"))
End With
'increment to the next row
lNextRow = lNextRow + 1
'close it
wbCsv.Close
'--------------------------------------------------------------------------------
'this is no longer necessary either as we're not using the dir function
'go to next file
'''' strFile = Dir
'''' Application.StatusBar = strFile
'--------------------------------------------------------------------------------
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'this loop is probably terminating it because of the "dead" Dir function
'''' Loop Until Len(strFile) = 0
'so try this instead
Loop Until IsEmpty(wsDealerExtracts.Cells(lNextRow, 6))
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'------------------------------------------
''''End If
'------------------------------------------
ActiveWorkbook.ActiveSheet.Range("A1").Select
'clean up
Set wbExtractSize = Nothing
Set wbCsv = Nothing
Set wsDealerExtracts = Nothing
Set wsMyCsvSheet = Nothing
Set FH = Nothing
End Sub