Maybe...
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, me.Range("A5")) Is Nothing Then
Exit Sub
end if
On Error Resume Next
Sheet9999.Name = Trim$(Replace(Me.Range("A5").Value, _
"For The Month Ending ", ""))
On Error Goto 0
End Sub
This looks at A5 of the sheet that owns the code. And it changes the name of
the worksheet that has a code name of Sheet9999.
You can find the codename of the worksheet by opening the VBE (alt-f11).
Showing the project explorer (ctrl-r)
Expanding the workbooks project (like expanding a folder in windows explorer)
Under the Microsoft Objects section, you'll see something like:
Sheet1 (NameYouSeeOnTheWorkSheetTabInExcel)
The codename is the name to the left of the name in ()'s.
You'll have to change that in the code.
And this code goes in the worksheet module for the worksheet that contains the
cell getting changed.
Eric said:
the cell i want to reference is on another tab will this formula still work?