+ Reply to Thread
Results 1 to 6 of 6

VBA to Rename Excel Worksheet Value of Cell.

  1. #1

    VBA to Rename Excel Worksheet Value of Cell.

    Hi,

    I need to write a VBA program to rename a worksheet. The tricky part
    is that I need it to be renamed to whatever a value is in a particular
    cell. For example, if cell C7 says "Management" I want the worksheet
    to be renamed "Management". Is this possible? Any help would be
    great! Thanks.

    -Idan


  2. #2
    Paul B
    Guest

    Re: VBA to Rename Excel Worksheet Value of Cell.

    try this,

    activesheet.name =[C7]


    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003


    <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I need to write a VBA program to rename a worksheet. The tricky part
    > is that I need it to be renamed to whatever a value is in a particular
    > cell. For example, if cell C7 says "Management" I want the worksheet
    > to be renamed "Management". Is this possible? Any help would be
    > great! Thanks.
    >
    > -Idan
    >




  3. #3

    Re: VBA to Rename Excel Worksheet Value of Cell.

    Perfect! Thanks!

    Paul B wrote:
    > try this,
    >
    > activesheet.name =[C7]
    >
    >
    > --
    > Paul B
    > Always backup your data before trying something new
    > Please post any response to the newsgroups so others can benefit from it
    > Feedback on answers is always appreciated!
    > Using Excel 2002 & 2003
    >
    >
    > <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I need to write a VBA program to rename a worksheet. The tricky part
    > > is that I need it to be renamed to whatever a value is in a particular
    > > cell. For example, if cell C7 says "Management" I want the worksheet
    > > to be renamed "Management". Is this possible? Any help would be
    > > great! Thanks.
    > >
    > > -Idan
    > >



  4. #4
    Sasa Stankovic
    Guest

    Re: VBA to Rename Excel Worksheet Value of Cell.

    Sub test()
    Worksheets("current_name").Name=Range("c7").Value
    End Sub

    <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I need to write a VBA program to rename a worksheet. The tricky part
    > is that I need it to be renamed to whatever a value is in a particular
    > cell. For example, if cell C7 says "Management" I want the worksheet
    > to be renamed "Management". Is this possible? Any help would be
    > great! Thanks.
    >
    > -Idan
    >




  5. #5
    Sasa Stankovic
    Guest

    Re: VBA to Rename Excel Worksheet Value of Cell.

    Sub test()
    Worksheets("current_name").Name=Range("c7").Value
    End Sub

    <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I need to write a VBA program to rename a worksheet. The tricky part
    > is that I need it to be renamed to whatever a value is in a particular
    > cell. For example, if cell C7 says "Management" I want the worksheet
    > to be renamed "Management". Is this possible? Any help would be
    > great! Thanks.
    >
    > -Idan
    >




  6. #6
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2002
    Posts
    12

    Re: VBA to Rename Excel Worksheet Value of Cell.

    what is that cell contains a date (format is DD/MM/YYYY) that format is not accepted in changing the sheet name so how would i change the format in the code

+ 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