To all,
Can someone help me with a more efficient way to use the last row statement. I keep havign to change the destination cell number everytime if i use a different workbook or parameter. The issue i am having is highlighed in red.
LastRow = ActiveSheet.Range("D94").End(xlUp).Row
If LastRow > 1 Then
sh.Range("B9:L" & LastRow).Copy
'activate generator workbook
currentWB.Activate
'activate master worksheet
TargetSh.Activate
TargetSh.Range(DestCell.Address).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Set DestCell = DestCell.Offset(LastRow - 10)
dataWB.Close False
Can someone help me with a more efficient way to use the last row statement. I keep havign to change the destination cell number everytime if i use a different workbook or parameter. The issue i am having is highlighed in red.
LastRow = ActiveSheet.Range("D94").End(xlUp).Row
If LastRow > 1 Then
sh.Range("B9:L" & LastRow).Copy
'activate generator workbook
currentWB.Activate
'activate master worksheet
TargetSh.Activate
TargetSh.Range(DestCell.Address).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Set DestCell = DestCell.Offset(LastRow - 10)
dataWB.Close False