I can't get the below code to work. I'm trying to copy data from one spreadsheet in Sheet1 called Book1 and paste the data into a range in another spreadsheet. But it keeps crasing. Can anyone help.... Please
ub GetMyRates()
'will copy all data in ML rate sheet
Dim LastRow As Long
Dim tday As Date
Application.ScreenUpdating = False
Sheet1.Activate
Cells(65536, 3).Select
Selection.End(xlUp).Select
LastRow = Selection.Row
Sheet1.Range(Cells(1, 5), Cells(LastRow, 9)).Copy
Windows("Daily" & Format(tday, "mmdd"
& ".xls"
.Activate
DailyInfo.Activate
Range("Daily"
.ClearContents
DailyInfo.Cells(109, 1).PasteSpecial (xlValues)
Application.ScreenUpdating = True
End Sub
ub GetMyRates()
'will copy all data in ML rate sheet
Dim LastRow As Long
Dim tday As Date
Application.ScreenUpdating = False
Sheet1.Activate
Cells(65536, 3).Select
Selection.End(xlUp).Select
LastRow = Selection.Row
Sheet1.Range(Cells(1, 5), Cells(LastRow, 9)).Copy
Windows("Daily" & Format(tday, "mmdd"
DailyInfo.Activate
Range("Daily"
DailyInfo.Cells(109, 1).PasteSpecial (xlValues)
Application.ScreenUpdating = True
End Sub