View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Manager Manager is offline
external usenet poster
 
Posts: 3
Default Linking Tab Names to a single cell with a worksheet

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"?