I'm trying to set up a spreadsheet that duplicates the previous worksheet into a new tab daily.
I have it set up to create a new worksheet and rename it daily, but I can't figure out the duplication aspect.
Sub AddDayWkst()
Dim ws As Worksheet
Dim strName As String
Dim bCheck As Boolean
On Error Resume Next
strName = Format(Date, "mm-dd-yy")
bCheck = Len(Sheets(strName).Name) > 0
If bCheck = False Then
Set ws = Worksheets.Add(Before:=Sheets(1))
ws.Name = strName
End If
End Sub
I need to duplicate the previous day's worksheet and paste it into the new worksheet.