Hello guys, I have the following code, which I use to fill and then paste my array. This go around, I'm trying to paste the values into a worksheet("Upload Template") which is in another workbook. This specific worksheet has a lot of columns hidden. Is there a way I can make this code paste the data into the visible cells only?
Thank you.
VBA Code:
Sub Testing()
Dim lr&, GL
lr = Range("A:R").SpecialCells(xlCellTypeLastCell).Row
GL = Range("A1:R" & lr).Value
Workbooks("Upload Template.xlsm").Activate
Range("E9").Resize(UBound(GL), UBound(GL, 2)).Value = GL
End Sub
Thank you.