Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gary, how would you rename the tab with a Text Box on a worksheet? Not a
userform I've tried the following doesn't seem to work. Private Sub TextBox127_LostFocus() ActiveSheet.Name = Me.Textbox127.value End Sub "Gary''s Student" wrote: Put this Event macro in the worksheet code area: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set a = Range("A:A") If Intersect(t, a) Is Nothing Then Exit Sub n = t.Row Sheets(n + 1).Name = t.Value End Sub -- Gary''s Student - gsnu200772 "Jeff Lowenstein" wrote: "Gary''s Student" wrote: Sub renamre() Sheets("Sheet1").Activate n = Cells(Rows.Count, 1).End(xlUp).Row For i = 1 To n Sheets(i + 1).Name = Cells(i, 1).Value Next End Sub -- Gary''s Student - gsnu200772 Gary, Thank you for the answer, but will this be automatic - i.e. as soon as cell A1 is changed, sheet2 is renamed? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Naming a sheet | Excel Discussion (Misc queries) | |||
Automatic naming Worksheet tabs | Excel Programming | |||
Automatic naming Worksheet tabs | Excel Programming | |||
Automatic Range Naming using Advanced Filter? | Excel Programming | |||
Automatic sheet naming | Excel Programming |