+ Reply to Thread
Results 1 to 4 of 4

Sheet Name

  1. #1
    BOONER
    Guest

    Sheet Name

    I need a macro that will change the names of the sheets in a workbook equal
    to a given cell in those sheets

  2. #2
    Crowbar via OfficeKB.com
    Guest

    Re: Sheet Name

    BOONER wrote:
    >I need a macro that will change the names of the sheets in a workbook equal
    >to a given cell in those sheets



    sub userform_initialize()

    dim x as long
    For x = 1 to activeworkbook.sheets.count
    activesheet.name = sheets(x).range("A").value
    next x

    end sub

    prec_tec@yahoo.com

    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200605/1

  3. #3
    BOONER
    Guest

    Re: Sheet Name

    Thanks this puts me on the right track. However, for some reason it is
    naming the first sheet with data pulled from the third.

    "Crowbar via OfficeKB.com" wrote:

    > BOONER wrote:
    > >I need a macro that will change the names of the sheets in a workbook equal
    > >to a given cell in those sheets

    >
    >
    > sub userform_initialize()
    >
    > dim x as long
    > For x = 1 to activeworkbook.sheets.count
    > activesheet.name = sheets(x).range("A").value
    > next x
    >
    > end sub
    >
    > prec_tec@yahoo.com
    >
    > --
    > Message posted via OfficeKB.com
    > http://www.officekb.com/Uwe/Forums.a...mming/200605/1
    >


  4. #4
    BOONER
    Guest

    Re: Sheet Name

    Okay, this works..........Thanks a lot Crowbar

    Dim x As Long
    For x = 3 To ActiveWorkbook.Sheets.Count
    Sheets(x).Activate
    ActiveSheet.Name = Sheets(x).Range("I7").Value
    Next x

    "BOONER" wrote:

    > Thanks this puts me on the right track. However, for some reason it is
    > naming the first sheet with data pulled from the third.
    >
    > "Crowbar via OfficeKB.com" wrote:
    >
    > > BOONER wrote:
    > > >I need a macro that will change the names of the sheets in a workbook equal
    > > >to a given cell in those sheets

    > >
    > >
    > > sub userform_initialize()
    > >
    > > dim x as long
    > > For x = 1 to activeworkbook.sheets.count
    > > activesheet.name = sheets(x).range("A").value
    > > next x
    > >
    > > end sub
    > >
    > > prec_tec@yahoo.com
    > >
    > > --
    > > Message posted via OfficeKB.com
    > > http://www.officekb.com/Uwe/Forums.a...mming/200605/1
    > >


+ 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