+ Reply to Thread
Results 1 to 4 of 4

Name the sheet tab as a cell text?

  1. #1
    Registered User
    Join Date
    04-19-2004
    Posts
    18

    Name the sheet tab as a cell text?

    Hi
    I'm using the code under to name the sheet tab as the text in A12, but I want to add some extra characthers to the sheet name.
    It's possible?

    i.e
    If the text in A12 is Bravo, I want the name in the sheet tab to be Bravo_st.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$12" Then
    On Error Resume Next
    Application.EnableEvents = False
    Me.Name = Target.Value
    Application.EnableEvents = True
    End If
    End Sub

    best regards
    Rune

  2. #2
    Registered User
    Join Date
    06-21-2004
    Location
    Phoenix, Az
    Posts
    30

    Lightbulb

    Try the following code modification (shown in bold).

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$12" Then
    On Error Resume Next
    Application.EnableEvents = False
    Me.Name = Target.Value & "_st"
    Application.EnableEvents = True
    End If
    End Sub

  3. #3
    Registered User
    Join Date
    04-19-2004
    Posts
    18
    It was no change.
    Thanks anyway crispbd.

    Other suggestion?

    Rune

  4. #4
    Registered User
    Join Date
    04-19-2004
    Posts
    18
    My fault crispbd, it works!
    I write the code wrong place.
    Thank you very much
    Rune

+ 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