#1
|
||||
|
||||
change in the name of sheet accordingly
Hii All,
Can the name of a sheet be changed according to the data in a particular cell automatically with the help of code or formula. Thanks in @dvance. |
#2
|
|||
|
|||
You can use this code in private module of the sheet:
Code:
Private Sub Worksheet_Change(ByVal Target As Range) If ActiveSheet.Range("C5").Value <> ActiveSheet.Name Then ActiveSheet.Name = ActiveSheet.Range("C5").Value End If End Sub You can try changing to Worksheet_Activate if you want to rename sheet based on this event...(will run when you open this sheet) |
#3
|
||||
|
||||
i'm unable to get result based on ur code
i have entered data in cell c5 but the sheet name is not getting changed accordingly |
#4
|
|||
|
|||
Is the code placed in the private module of the sheet?
like in the sample attached? I guess no.. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ensure I have an 8.5x11 sheet | Taylor | Word | 3 | 10-09-2011 12:39 AM |
How do I specify which sheet to save as PDF? | shabbaranks | Excel Programming | 3 | 09-14-2011 09:19 PM |
Reading Values from another sheet | Raabi | Excel | 2 | 05-20-2011 02:14 AM |
Delete sheet through VBA | Salim Khan | Excel | 1 | 08-30-2010 09:11 AM |
copy cell from sheet 2 to sheet 3 macro | slipperyjim | Excel Programming | 1 | 02-18-2010 01:31 AM |