+ Reply to Thread
Results 1 to 2 of 2

Automatically Naming Worksheets

  1. #1
    Registered User
    Join Date
    02-27-2005
    Posts
    35

    Automatically Naming Worksheets

    I have a spreadsheet that has 12 worksheets. on each of the 12 cell e1 will contain names. What I need is for cell e1 to change the worksheet name when a name is entered into the cell. i have been looking fo rthis solution all night and i have seen some code and what not but have no idea what to do with it i can do functions but know nothing about the rest of it. thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    09-05-2004
    Location
    Melbourne
    Posts
    193
    Open the VB Editor by pressing ALT+F11. YOu may see a number of VBAProjects. MAke sure you are in the VBAProject of the current workbook. Double-click on 'ThisWorkbook' and paste the following code.

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

    On Error GoTo Errorhandler

    If Target.Address = "$E$1" Then Sh.Name = Target.Value

    Errorhandler:

    Application.EnableEvents = True

    End Sub

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1