I want to have a sheet tab name be automatically changed to the value in a cell on that sheet. For example, if A1 value is Jan 07, then the sheet tab name would be Jan 07. If I change A1 to Feb 07, then the tab name would change.
I want to have a sheet tab name be automatically changed to the value in a cell on that sheet. For example, if A1 value is Jan 07, then the sheet tab name would be Jan 07. If I change A1 to Feb 07, then the tab name would change.
Hi,
Try this
Right click sheet tab and select view code. Paste the below in and close
Format cell as TextPlease Login or Register to view this content.
VBA Noob
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks. It works but with a little glitch.
After entering the code, I have to F2 cell A1 and then "enter" for it to take.
But thereafter it works OK. I guess it needs an "enter" for it to take.
Hi,
I used a change event which need the cell activated.
You could try one of the events on the below link like
http://www.cpearson.com/excel/events.htmPlease Login or Register to view this content.
VBA Noob
Hi There,
I have a code below, I have a file with the first page being the summary and I need the rest of the tab names to be changed according to one cell K2 reference that are referencing in all the tab names so the Date for example is in cell K2 in every tab, and I need the tab name to reflect K2 changed.
Private Sub CommandButton1_Click()
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Name = Range("K2").Value
Sheet2.Name = Range("K2").Value
Sheet3.Name = Range("K2").Value
Sheet4.Name = Range("K2").Value
Sheet5.Name = Range("K2").Value
Sheet6.Name = Range("K2").Value
Sheet7.Name = Range("K2").Value
Sheet8.Name = Range("K2").Value
Sheet9.Name = Range("K2").Value
Sheet10.Name = Range("K2").Value
Sheet11.Name = Range("K2").Value
Sheet12.Name = Range("K2").Value
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks