ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   rename sheet automatically (https://www.excelbanter.com/excel-programming/304921-rename-sheet-automatically.html)

Tami[_4_]

rename sheet automatically
 
Hi new to excel and just want to rename the sheet automatically using a name
in a cell on the spreadsheet.

Thanks in advance




JE McGimpsey

rename sheet automatically
 
One way:

put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If .Address(False, False) = "A1" Then
On Error Resume Next
Me.Name = .Text
On Error GoTo 0
End If
End With
End Sub


Change the cell reference to suit.




In article , "Tami"
wrote:

Hi new to excel and just want to rename the sheet automatically using a name
in a cell on the spreadsheet.

Thanks in advance


Bigwheel

rename sheet automatically
 
Do you mean something like this ...

ActiveSheet.Name = ActiveCell.Value

or something more complicated?

"Tami" wrote in message
...
Hi new to excel and just want to rename the sheet automatically using a

name
in a cell on the spreadsheet.

Thanks in advance






Soo Cheon Jheong[_2_]

rename sheet automatically
 
Hi,


Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Me.Name = Range("A1").Value
On Error GoTo 0
End Sub


--
Regards,
Soo Cheon Jheong
_ _
^вп^
--




All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com