Set the security level to low/medium in (Tools|Macro|Security). From workbook
press Alt+F11 to launch VBE (Visual Basic Editor). From the left treeview
search for the workbook name and click on + to expand it. Within that you
should see the following
VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook
Double click 'This WorkBook' and paste the below code to the right code pane.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Count = 1 And Target.Address = "$B$5" Then
If Trim(Target.Text) <> "" And IsDate(Target.Text) Then
Sh.Name = Format(CDate(Target.Text), "dd-mmm-yyyy")
End If
End If
End Sub
The code will look at entries made in cell B5 and if it is a date names the
worksheets accordingly
If this post helps click Yes