change spreadsheet name change

T

TJ

Hi,

I would like to change the spreadsheet name to say whatever I type in cell A1.

Please advise

thanks
TJ
 
J

Jacob Skaria

If you are looking to achieve it using code; try this...

A1 = TestSheet

Launch VBE using Alt+F11. Ctrl+G will launch immediate window. Paste the
below code and enter..

Activesheet.name = Range("A1")

If this post helps click Yes
 
L

Luke M

Right click on sheet tab.
Choose "View code".

Paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("A1") Then
ActiveSheet.Name = Range("A1").Value
End If
End Sub

'Close VBA editor.
 
D

Don Guillett

Right click sheet tab>view code copy/paste this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub
ActiveSheet.Name = Target
End Sub
 
Top