Hi ,
I have a requirement where in first i want to delete the contents of the Sheet2 from Column A to E and then do the Dynamic Copy from Sheet1 to Sheet2 . I have code for ynamic Copy from Sheet1 to Sheet2 but the beforing running this i want to add code for Delete in Sheet2 , so that first it deletes the content and then copy the fresh data whenever i click the Copy button. Can some one give me additional code to be added in below.
I have a requirement where in first i want to delete the contents of the Sheet2 from Column A to E and then do the Dynamic Copy from Sheet1 to Sheet2 . I have code for ynamic Copy from Sheet1 to Sheet2 but the beforing running this i want to add code for Delete in Sheet2 , so that first it deletes the content and then copy the fresh data whenever i click the Copy button. Can some one give me additional code to be added in below.
Code:
Sub DynCopy()
Dim strRng As Long
strRng = Range("H" & Rows.Count).End(xlUp).Row
Sheets("Sheet1").Range("H13:L" & strRng).Copy Destination:=Sheets("Sheet2").Range("A1")
End Sub