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

Rowan, Thanks for the post I appreciate it!
I have come to the same conclusion, but not being a VBA guy I have no idea
of how to get it to trigger. I don't really care what the method is, just
the results, Is there any other way to get the the contents of C5 to the
Sheet tab?

"Rowan" wrote:

The reason this macro is no longer working is that it is dependent on the
Worksheet_Change event firing. You are no longer changing anything in the
target cell - the value may change but the formula is static. You need to
find a new way to activate the change to the sheet name.

Hope this helps
Rowan

"Mike R" wrote:

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.