+ Reply to Thread
Results 1 to 3 of 3

Thread: Help with Macro - copy worksheet

  1. #1
    Registered User
    Join Date
    01-23-2012
    Location
    Oaklahoma City, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Smile Help with Macro - copy worksheet

    I found a Macro that creates a new sheet and copies information form another worksheet. I need it to copy the formatting from the old sheet to the new sheet. It copies the information just fine, but it needs to copy the format too. Any help that could be provided would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Help with Macro - copy worksheet

    I think this might work

    Sub CopyWS()
    Dim WSName As String
    Worksheets("CopyFrom").Copy Before:=Worksheets(2)
    WSName = InputBox("Worksheet Name")
    ActiveSheet.Name = WSName
    
    End Sub
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  3. #3
    Registered User
    Join Date
    01-23-2012
    Location
    Oaklahoma City, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Help with Macro - copy worksheet

    I tried it, but it didn't work. It still copies without formatting. Thanks anyways.

+ 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.2.0