I have the following code that is meant to copy and paste certain values from one workbook to another, but I need the macro to make a list in the workbook being pasted into by always pasting on the next available line. I keep getting an "Object Required" error with my current code and I can't figure out what to do.
Sub Save_Ratings()
'
' Save_Ratings Macro
'
'
ChDir "F:\FSG\DANA\Muni Offering Sheet Ratings"
Workbooks.Open Filename:= _
"F:\FSG\DANA\Muni Offering Sheet Ratings\Muni Offering Sheet Ratings.xlsx"
Windows("Copy of Muni Offering Sheet-with True Yield 2.xlsm").Activate
Range("D3").Select
Selection.Copy
Windows("Muni Offering Sheet Ratings.xlsx").Activate
Worksheets("Ratings").Activate
lastRow = ActiveSheet.Cells(Row.Count, "A").End(xlUp).Row
ActiveSheet.Range("A" & lastRow + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Copy of Muni Offering Sheet-with True Yield 2.xlsm").Activate
Sheets("Muni").Select
Range("N24:T25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Muni Offering Sheet Ratings.xlsx").Activate
lastRow = ActiveSheet.Cells(Row.Count, "A").End(xlUp).Row
ActiveSheet.Range("A" & lastRow + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Copy of Muni Offering Sheet-with True Yield 2.xlsm").Activate
Range("N30:T31").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Muni Offering Sheet Ratings.xlsx").Activate
lastRow = ActiveSheet.Cells(Row.Count, "A").End(xlUp).Row
ActiveSheet.Range("A" & lastRow + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
Sheets("MUNI INPUT").Select
Range("D3").Select
End Sub
Any help would be greatly appreciated!
Thanks!
Bookmarks