here is my code that is failing
Dim OpenFileName As String
Dim wb As Workbook, wb2 As Workbook
Dim lastrow
'Select and Open workbook
OpenFileName = Application.GetOpenFilename(",*.csv")
If OpenFileName = "False" Then Exit Sub
Set wb = Workbooks(OpenFileName)
Set wb2 = Workbooks("MasterLogFile.xlsm")
MsgBox OpenFileName
With wb
'lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
Range("A3:ME" & lastrow).Copy
.Sheets("Log Imports").Range("A7").Paste
End With
it fails on the set wb line, what am i doing wrong?