I have a spreadsheet where I want to copy data from one sheet to another. The range to be copied is dependent on a few variables. It will always be 55 rows long and 'j' columns wide. Variable j represents the variable that will change every time this macro is run. I'm having issues when I try to activate the range to be copied. I get an application error or a with block error depending on whether the with block is int he code. I saw this on another website which had me insert the with block: http://stackoverflow.com/questions/1...d-error-in-vba
It's been a while since I've coded and I am very rusty. Anyways, here is my code below. I feel like if I can get past this copying the range part and understanding my errors using offset, I can easily finish up what I want it to do - which is why my code will appear to be useless (I haven't finished the rest of it yet). So thanks in advance!
![]()
Sub CopyStuff() Dim noProp, noStreams, countInt As Integer Dim pasteRng As Range Worksheets("Summary").Activate noProp = Range("B1") noStreams = Range("B2") With Worksheets("Output") Range("E5").Activate pasteRng = Range(ActiveCell, ActiveCell.Offset(55, noStreams - 1)) End With End Sub
Bookmarks