Please Help

  • Thread starter Thread starter jdorion
  • Start date Start date
J

jdorion

I am a fairly new user to excel. I was wondering if anyone can help me.
I have a workbook that has a spot in the left hand corner for the date.
I need to know how if I change the date in the left hand corner it
changes the date on the tab instead of having to always change both.

Thanks Jessica
 
right click on sheet tab>view code>insert this>save
As written, works when you change cell B4

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$B$4" Then Exit Sub
ActiveSheet.Name = Format([b4], "mm-dd-yyyy")
End Sub
 
Try a worksheet_change macro like:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error Resume Next
If Target.Address = "$A$1" Then
Target.Parent.Name = Format(Target.Value, "mm-dd-yyyy")
End If
End Sub

Press ALT+F11, click on the sheet module, and paste this
into the window.

HTH
Jason
Atlanta, GA
 
Back
Top