change spreadsheet name change

  • Thread starter Thread starter TJ
  • Start date Start date
T

TJ

Hi,

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

Please advise

thanks
TJ
 
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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top