Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following code that someone helped me with yesterday that is used
to change the name of the tab to whatever name is in cell "C1.": Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range("C1"), Target) Is Nothing Then Exit Sub End If v = Target.Value ActiveSheet.Name = v End Sub The problem is that is seems to work sometimes and then will stop. Or it won't work when I try to copy the page, etc. Is there some trick I'm missing? Thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this and remember you can't have tabs with same name
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("C1").Value = "" Then End ActiveSheet.Name = Range("C1").Value End Sub "Michael in Texas" wrote: I have the following code that someone helped me with yesterday that is used to change the name of the tab to whatever name is in cell "C1.": Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range("C1"), Target) Is Nothing Then Exit Sub End If v = Target.Value ActiveSheet.Name = v End Sub The problem is that is seems to work sometimes and then will stop. Or it won't work when I try to copy the page, etc. Is there some trick I'm missing? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Code to Change the Tab Name | Excel Discussion (Misc queries) | |||
change SUMIF formula into a vb code | Excel Discussion (Misc queries) | |||
combo box on change code | Excel Discussion (Misc queries) | |||
change the code to be a formula | Excel Discussion (Misc queries) | |||
Running code on a drop down selection change | Excel Worksheet Functions |