Hi,
So i'm trying to set a dim which helps me to copy some rows. I'm new with this and build the code with the help of another post on this forum. One problem with this code is that i need to activate the sheet, which i do not want to do. I've managed this with the .copy part. How do i fix this with the LastRow = Range("D11") part?
I've tried this:
This doesn't work. Does anyone know how to set the range without switching to the "Achter de schermen" sheet?
So i'm trying to set a dim which helps me to copy some rows. I'm new with this and build the code with the help of another post on this forum. One problem with this code is that i need to activate the sheet, which i do not want to do. I've managed this with the .copy part. How do i fix this with the LastRow = Range("D11") part?
VBA Code:
Sheets("Achter de schermen").Activate
Dim LastRow
LastRow = Range("D11").Value
Range("B13:G" & LastRow).Copy
Sheets("Spelers").Range("A3").Insert Shift:=xlDown
Sheets("Spelers").Range("A3").PasteSpecial Paste:=xlPasteValues, SkipBlanks:=True
I've tried this:
Code:
Sheets("Achter de schermen").Activate
Dim LastRow
LastRow = Sheets("Achter de schermen").Range("D11").Value
Range("B13:G" & LastRow).Copy
Sheets("Spelers").Range("A3").Insert Shift:=xlDown
Sheets("Spelers").Range("A3").PasteSpecial Paste:=xlPasteValues, SkipBlanks:=True
This doesn't work. Does anyone know how to set the range without switching to the "Achter de schermen" sheet?