first off, if you ever have to refer to an object (e.g. a workbook, a range) more than once, it's more efficient to set it equal to a variable and refer to the variable. this will make your code run faster
try this:
Code:
Sub DealerData_Extract()
Dim wbkTemplate As Workbook
Dim wbkCsv As Workbook
Dim shtExtractData As Sheet
Dim rgCellA1 As Range
Dim iRowOffset As Long
Dim iNextRow As Long
'Workbooks is a member of globals, no need to preface with Application
Set wbkTemplate = Workbooks.Open("C:\Documents and Settings\SeymourJ\Desktop\Tasks\HondaExtractMacro\DealerData_Extract_Feed_Template.xls")
Set shtExtractData = wbkTemplate.Sheets("ExtractData")
'figure out the next row that's gonna take data
'-------------------------------------------------------------------------------------------------------
'You may need to add to iNextRow if you have empty rows at the top of the worksheet. Like so:
'iNextRow = WorksheetFunction.CountA(shtExtractData.Range("B:B")) + 5
'-------------------------------------------------------------------------------------------------------
iNextRow = WorksheetFunction.CountA(shtExtractData.Range("B:B")) + 2
'You should rarely if ever select a range or sheet etc. Slows down code execution
'The cell value is the default property, so no need to specify it.
Sheets("ExtractReport").Range("B2") = Format(Date, "mm-yyyy")
Set wbkCsv = Workbooks.Open("C:\Documents and Settings\SeymourJ\Desktop\Tasks\HondaExtractMacro\Actual_Participation_12_2010.csv")
Set rgCellA1 = wbkCsv.Sheets(1).Range("A1")
With rgCellA1
Do While Not IsEmpty(.Offset(iRowOffset, 0))
'no quotations around the word true, it's a boolean value
If .Offset(iRowOffset, 15) = True And .Offset(iRowOffset, 52).Value = True Then
shtExtractData.Cells(iNextRow, 2) = .Offset(iRowOffset, 0)
iNextRow = iNextRow + 1
End If
iRowOffset = iRowOffset + 1
Loop
End With
''uncomment this once you're code is working fine so it automatically saves and closes the workbooks
'wbkTemplate.Close True
'wbkCsv.Close
'don't forget to release your computer's memory. you should do this with every variable that you must use the "Set" keyword with (objects).
Set wbkTemplate = Nothing
Set wbkCsv = Nothing
Set shtExtractData = Nothing
Set rgCellA1 = Nothing
End Sub