Hi guys,
im new to this forum.
I have a VBA code that copies a range to a new sheet and each time i run the macro, it will copy the range to the next empty cell.
However after copying 3-4 times. it keeps giving me error "Run time Error 1004 - No Cells were found"
This is the code that im using. The line that it highlights when the error comes up is underline. Can anyone help fix this error. ive tried altering the range but it still gives me errors after a few copies.
Sheets("Roster Generator").Select
Range("A1:G8").Select
Selection.Copy
Sheets("Archive").Select
Set emptyCells = Range("A2:A9999").SpecialCells(xlCellTypeBlanks)
Range(emptyCells.Cells(1).Address, emptyCells.Cells(1).Offset(7, 10).Address).Select
ActiveSheet.Paste
Range("A2").Select
Sheets("Roster Generator").Select
im new to this forum.
I have a VBA code that copies a range to a new sheet and each time i run the macro, it will copy the range to the next empty cell.
However after copying 3-4 times. it keeps giving me error "Run time Error 1004 - No Cells were found"
This is the code that im using. The line that it highlights when the error comes up is underline. Can anyone help fix this error. ive tried altering the range but it still gives me errors after a few copies.
Sheets("Roster Generator").Select
Range("A1:G8").Select
Selection.Copy
Sheets("Archive").Select
Set emptyCells = Range("A2:A9999").SpecialCells(xlCellTypeBlanks)
Range(emptyCells.Cells(1).Address, emptyCells.Cells(1).Offset(7, 10).Address).Select
ActiveSheet.Paste
Range("A2").Select
Sheets("Roster Generator").Select