I am trying to create a code to paste a range from a pivot multiple times based on a separate cell value. Essentially I'm trying to create a dynamic cashflow.
The code is not working, and im getting the following error:
Compile error:
Method or data member not found
Method See code attempt below
Sub TradeDump()
`Dim ws As Worksheet`
`Dim wsp As Worksheet`
`Dim wsc As Worksheet`
`Dim i As Integer`
`Set wsp = Sheets("Pivot")`
`Set ws = Sheets("Cashflow Fix Data")`
`Set wsc = Sheets("Control")`
`Period = wsc.Range("Term")`
`rng = wsp.Range(Range("G6"), wsp.Range("G6").End(xlDown)).Select`
`For i = 1 To Period`
`NextRow = ws.Cells(ws.Rows.Count, "E").End(xlUp).Row + 1`
'get the Next Empty Row
`ws.Range("E" & NextRow).PasteSpecial xlPasteAll`
'paste
Next i
End Sub