+ Reply to Thread
Results 1 to 4 of 4

Naming The Tabsheet from a cell

  1. #1
    JackR
    Guest

    Naming The Tabsheet from a cell

    I have this routine that I am runing, but the problem is it changes all the
    tabs on every sheet, how can I have only change the tab for the sheet I am
    working on?

    Here is what I am using

    Sub nametab()
    Dim i As Integer
    On Error Resume Next
    For i = 1 To Sheets.Count
    Sheets(i).Name = Sheets(i).Range("G1").Value
    Next i
    On Error GoTo 0

    Any help would be great.

  2. #2
    Ardus Petus
    Guest

    Re: Naming The Tabsheet from a cell

    sub rename()
    ActiveSheet.Name = Range("G1").Value
    end sub

    HTH
    --
    AP

    "JackR" <[email protected]> a écrit dans le message de
    news:[email protected]...
    > I have this routine that I am runing, but the problem is it changes all

    the
    > tabs on every sheet, how can I have only change the tab for the sheet I am
    > working on?
    >
    > Here is what I am using
    >
    > Sub nametab()
    > Dim i As Integer
    > On Error Resume Next
    > For i = 1 To Sheets.Count
    > Sheets(i).Name = Sheets(i).Range("G1").Value
    > Next i
    > On Error GoTo 0
    >
    > Any help would be great.




  3. #3
    Chip Pearson
    Guest

    Re: Naming The Tabsheet from a cell

    Jack,

    Try

    ActiveSheet.Name = ActiveSheet.Range("G1").Value


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "JackR" <[email protected]> wrote in message
    news:[email protected]...
    >I have this routine that I am runing, but the problem is it
    >changes all the
    > tabs on every sheet, how can I have only change the tab for the
    > sheet I am
    > working on?
    >
    > Here is what I am using
    >
    > Sub nametab()
    > Dim i As Integer
    > On Error Resume Next
    > For i = 1 To Sheets.Count
    > Sheets(i).Name = Sheets(i).Range("G1").Value
    > Next i
    > On Error GoTo 0
    >
    > Any help would be great.




  4. #4
    JackR
    Guest

    Re: Naming The Tabsheet from a cell

    Thank you, that worked. I appreciate the help

    "Chip Pearson" wrote:

    > Jack,
    >
    > Try
    >
    > ActiveSheet.Name = ActiveSheet.Range("G1").Value
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    > "JackR" <[email protected]> wrote in message
    > news:[email protected]...
    > >I have this routine that I am runing, but the problem is it
    > >changes all the
    > > tabs on every sheet, how can I have only change the tab for the
    > > sheet I am
    > > working on?
    > >
    > > Here is what I am using
    > >
    > > Sub nametab()
    > > Dim i As Integer
    > > On Error Resume Next
    > > For i = 1 To Sheets.Count
    > > Sheets(i).Name = Sheets(i).Range("G1").Value
    > > Next i
    > > On Error GoTo 0
    > >
    > > Any help would be great.

    >
    >
    >


+ 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