In VBA-Excel, Copy and paste the data plays an important role, we can copy data from one place and paste it at some other place in the same way like how we do it manually, and when you copy some data its goes to the Clipboard from there you can paste it at some other location.
Dim mainworkBook As Workbook
Set mainworkBook = ActiveWorkbook
Copy the Entire data from one sheet to another
For example if you want to copy the data “Sheet1” and paste it to in “Sheet2”.
For copy the data present in “Sheet1”
mainworkBook.Sheets(“Sheet1”).UsedRange.Copy
Read moreVBA-Excel: Copy/Paste data – Copy the Entire data from one sheet to another