Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put this in the Workbook module
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _ ByVal Target As Range) Dim EndNumber as String On Error resume next EndNumber = 0 sh.Name = sh.Range("a1").Value Retest: if err.number < 0 then EndNumber=EndNumber + 1 err.clear sh.Name = sh.Range("a1").Value + "(" + EndNumber + ")" goto Retest end if end sub If there is already a sheet with the same name, this will add a 1, 2, etc at the end. If you put it in the workbook module, it should run automatically. -- Best Regards, Luke M " wrote: Is there a way to name a sheet/tab by a value which is in A1 on its corresponding sheet? ~Andrew |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating/Naming New Worksheets Based on Select Cells in Master Worksheet | Excel Worksheet Functions | |||
Naming worksheets based on a cell value | Excel Programming | |||
Naming cells in a table based on column and row label | Excel Discussion (Misc queries) | |||
naming a file based on cell value? | Excel Programming | |||
naming .xls file based on a cell in excel | Excel Discussion (Misc queries) |