Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Place this in the Thisworkbook module Ric
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Target.Address = "$A$1" Then If Target.Value < "" Then On Error Resume Next ActiveSheet.Name = Target.Value On Error GoTo 0 End If End If End Sub If you change A1 in each sheet the tab name will change to the cell value -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Ric" wrote in message ... I want to run a macro in excel, such that when a name is typed into a cell and Return pressed the name becomes the sheet name... I have used: ActiveSheet.name = ActiveCell.value to do the naming Ideally this would work with the down arrow or tab as well - or even better, whenever the cell 'loses focus'. I hope this is as blindingly simple as I feel it should be... Thanks in advance Ric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign Macro to a Cell | Excel Worksheet Functions | |||
Formula or Macro to Assign Cell Locations | Excel Discussion (Misc queries) | |||
assign macro | Excel Worksheet Functions | |||
Assign a Macro | Excel Discussion (Misc queries) | |||
How to assign a macro | Excel Discussion (Misc queries) |