how could i modify the following code so i can copy and paste the entire text file (this code was used to previously copy an entire worksheet)
Rich (BB code):
Set wbCSV5 = Workbooks.Open("G:\a\b\c\d\" & "rpt1.txt")
With wbCSV5.Worksheets(1)
Cells.Select
Selection.copy
ThisWorkbook.Worksheets("rpt1").Range("a1").PasteSpecial Paste:=xlPasteValues
End With
Application.DisplayAlerts = False
wbCSV5.Close (False)