Linking Tab Names to a single cell with a worksheet
As long as you have already saved the Worksheet with the Tab name you want, I
think this is what your looking for.
Sub MyTab()
If Range("A1") = "" Then
[A1] =
"=MID(CELL(""FILENAME"",A1),FIND(""]"",CELL(""FILENAME"",A1))+1,225)"
End If
End Sub
--
Mike Q.
"Manager" wrote:
P.S. I have tried the following with no success.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
Application.EnableEvents = False
With Target
If .Value < "" Then
Me.Name = .Value
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
Manager wrote:
I have tried modifying the VBA code using several of the previous
suggestions but it does not change.
I am trying to link a worksheets "TAB" name to a particular cell in a
pre-existing file.
Question?
Does the sheet need to be named as a default "Sheet1"?
|