How to make workbook autocreate new sheet every month with data

Closed
liam8671 Posts 2 Registration date Thursday 24 August 2017 Status Member Last seen 24 August 2017 - 24 Aug 2017 à 12:52
liam8671 Posts 2 Registration date Thursday 24 August 2017 Status Member Last seen 24 August 2017 - 24 Aug 2017 à 14:39
Hello,

I am looking for some help, I am wanting my workbook to auto create a new sheet at the begging of every month and that when it makes the new sheet that it drags information from the last sheet or master sheet?




1 response

liam8671 Posts 2 Registration date Thursday 24 August 2017 Status Member Last seen 24 August 2017
24 Aug 2017 à 14:39
Update,

I am using the following code and it makes a new sheet every month.

Sub AddMonthWkst()
Dim ws As Worksheet
Dim strName As String
Dim bCheck As Boolean
On Error Resume Next
strName = Format(Date, "yyyy_mmmm")
bCheck = Len(Sheets(strName).Name) > 0

If bCheck = False Then
Set ws = Worksheets.Add(Before:=Sheets(1))
ws.Name = strName
End If

End Sub




But i was hoping when it made the new sheet that it would copy info from the previous months sheet.