Thread: Name on Tab
View Single Post
  #1   Report Post  
Mike R
 
Posts: n/a
Default Name on Tab

I have been using the following code to pull information from a cell to name
the sheet tab.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C5")) Is Nothing Then ' are we in client
cell name?
If ActiveSheet.Name = Sheet1.Name Then ' in case of grouped sheets
ActiveSheet.Name = Target.Value
End If
End If
End Sub


This code has always worked as long as I type the information into C5, in
this case that is the name of an employee. I built a table with all the
employee information I wanted and used VLOOKUP to place the data in the
relative sheets. Now the code does not "see" the information placed in C5. I
have tried to change the reference from "C5" to "DataSheet!B3" and that does
not work either. I have tried to copy and paste / Paste special / pasted link
and then reference that cell in the code. that does not work either. Is
there anyway to get the information in C5 that has been placed there with a
VLOOKUP formula to the sheet tab?

Mike R.