Solved

Make a sheet tab name equal to a cell

Posted on 2011-03-13
6
990 Views
Last Modified: 2012-10-11
Is there a way to make the name of a worksheet tab equal to a cell value.   Essentially I want someone to type their name in cell "A1" and then have that name become the tab name.  Is this possible?
0
Comment
Question by:Apex623
  • 3
  • 3
6 Comments
 
LVL 24

Expert Comment

by:StephenJR
ID: 35121704
Something like this?
With ActiveSheet
    .Name = .Range("A1").Value
End With

Open in new window

0
 
LVL 1

Author Comment

by:Apex623
ID: 35121707
How would this activate when they type in the cell?
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 35121722
Er, well you'd have to run the macro. Is this a single sheet, any sheet...?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:Apex623
ID: 35121776
Single sheet
0
 
LVL 24

Accepted Solution

by:
StephenJR earned 500 total points
ID: 35121781
In the sheet module:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$1" Then
    ActiveSheet.Name = Target.Value
End If

End Sub
0
 
LVL 1

Author Comment

by:Apex623
ID: 35121846
That works.  Thanks!  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question