Hi,
I'm trying to create VBA code that creates daily sheet and moves data to new sheet when running code. For example, I'm running today the code in the main sheet, it will automatically create sheet called "report 12.11.2021" and move the data from main sheet there.
The problem is that I can't find the solution to move the data from mainsheet to new created sheet. After this problem is solved, I'm able to create analysis and fix the data...
Creating new "report sheet" code below:
Sub MonthlyWorksheets()
' This macro places new worksheet every month in the workbook
Dim i As Integer
i = 1
Dim theDate As Date
theDate = Date
Debug.Print theDate
Do While i <= 1
Sheets.Add After:=ActiveSheet
ActiveSheet.Name = "Report " & theDate
i = i + 1
Loop
End Sub
I'm trying to create VBA code that creates daily sheet and moves data to new sheet when running code. For example, I'm running today the code in the main sheet, it will automatically create sheet called "report 12.11.2021" and move the data from main sheet there.
The problem is that I can't find the solution to move the data from mainsheet to new created sheet. After this problem is solved, I'm able to create analysis and fix the data...
Creating new "report sheet" code below:
Sub MonthlyWorksheets()
' This macro places new worksheet every month in the workbook
Dim i As Integer
i = 1
Dim theDate As Date
theDate = Date
Debug.Print theDate
Do While i <= 1
Sheets.Add After:=ActiveSheet
ActiveSheet.Name = "Report " & theDate
i = i + 1
Loop
End Sub