+ Reply to Thread
Results 1 to 2 of 2

Macro Help needed

  1. #1
    tamato43
    Guest

    Macro Help needed

    I'm trying to record a macro but I'm having difficulty with a particular
    action.

    I'm trying to copy text from a particular cell, Lets say Cell A1, and then
    go to the "Sheet Tabs", currently labeled Sheet 1, and paste the text to
    rename the sheet.

    Can Someone tell me what I'm missing from the following macro to make this
    happen:

    Sub Macro()
    '
    ' Macro Macro
    ' Macro recorded 8/18/2005 by Anthony Amato
    '

    '
    Range("A1").Select
    Selection.Copy
    Sheets("Sheet 1").Select
    Sheets("Sheet 1").Name = " " (Should I add paste here? and how)
    Range("B17").Select
    End Sub


    Any help would be greatly appreciated.


  2. #2
    bigwheel
    Guest

    RE: Macro Help needed

    All you need is something like this:-

    Sub Macro()
    Sheets(1).Name = Range("A1").Value
    Range("B17").Select
    End Sub

    Refer to Sheet1 by number rather than name as you can rename the sheet at
    any time by changing the value in A1

    "tamato43" wrote:

    > I'm trying to record a macro but I'm having difficulty with a particular
    > action.
    >
    > I'm trying to copy text from a particular cell, Lets say Cell A1, and then
    > go to the "Sheet Tabs", currently labeled Sheet 1, and paste the text to
    > rename the sheet.
    >
    > Can Someone tell me what I'm missing from the following macro to make this
    > happen:
    >
    > Sub Macro()
    > '
    > ' Macro Macro
    > ' Macro recorded 8/18/2005 by Anthony Amato
    > '
    >
    > '
    > Range("A1").Select
    > Selection.Copy
    > Sheets("Sheet 1").Select
    > Sheets("Sheet 1").Name = " " (Should I add paste here? and how)
    > Range("B17").Select
    > End Sub
    >
    >
    > Any help would be greatly appreciated.
    >


+ 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