Results 1 to 3 of 3

Thread: [RESOLVED] Duplicating a Worksheet

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2006
    Posts
    223

    Resolved [RESOLVED] Duplicating a Worksheet

    Is there an efficient way of duplicating a worksheet in another workbook?

    I don't mean just values -- everything. Values, borders, row heights, column widths, graphics, graphic settings (e.g. "don't move or size with cells"), cell interior colors, etc.

    Thanks!
    Pete
    Last edited by caffeine; Jun 8th, 2007 at 09:01 AM. Reason: Listed borders twice

  2. #2
    New Member
    Join Date
    May 2007
    Posts
    10

    Re: Duplicating a Worksheet

    Yes.
    Code:
    Sheets(1).Copy Before:=Sheets(2)

  3. #3
    Hyperactive Member pgag45's Avatar
    Join Date
    Mar 2007
    Location
    Colorado
    Posts
    262

    Re: Duplicating a Worksheet

    If you want it in another workbook, it would look like

    Worksheets(SheetName).Copy Before:=Workbooks(WorkbookName).Sheets(1)

    Middle of this thread may help too...

    http://vbforums.com/showthread.php?t=469042

    As you need to open WorkbookName first, copy, and then close that workbook... Also have to splice WorkbookName, if you just know the path of it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width