Bob Kempsell
New Member
Hi Group, I am using a VBA to add a master Worksheet with the date as the name weekly.
in addition I have 20 worksheets that have a safety related topic I would like to use a VBA to add one of the safety topic worksheets weekly but do not want to use the same worksheet that has already been used.
Below is the VBA that I'm using to add the Master worksheet
Below is the VBA that I'm using to add the Safety Topic Worksheet
The Set ws1 = ThisWorkbook.Worksheets("Safety Topic 1") represents one of the Safety Topic Worksheets, there are 20 additionl sheets
Please help
in addition I have 20 worksheets that have a safety related topic I would like to use a VBA to add one of the safety topic worksheets weekly but do not want to use the same worksheet that has already been used.
Below is the VBA that I'm using to add the Master worksheet
Code:
Dim ws1 As Worksheet
Set ws1 = ThisWorkbook.Worksheets("Master")
ws1.Copy ThisWorkbook.Sheets(Sheets.Count)
Dim SheetName As String
SheetName = Format(Date, "mm-dd-yyyy-""Definable Work Areas") 'Change the format as per your requirement
ActiveSheet.Name = SheetName
End Sub
Code:
Sub Copysafetysheet()
Dim ws1 As Worksheet
Set ws1 = ThisWorkbook.Worksheets("Safety Topic 1")
ws1.Copy ThisWorkbook.Sheets(Sheets.Count)
Dim SheetName As String
SheetName = Format(Date, "mm-dd-yyyy-""Safety Brief") 'Change the format as per your requirement
ActiveSheet.Name = SheetName
End Sub
Please help
Last edited by a moderator: