+ Reply to Thread
Results 1 to 4 of 4

copy sheet from one to new sheet

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    paris
    MS-Off Ver
    Excel 2010
    Posts
    25

    copy sheet from one to new sheet

    Dim ws1 As Worksheet
    Dim ws1 As Worksheet


    Set ws1 = ThisWorkbook.Worksheets("sheet 1")
    ws1.Copy ThisWorkbook.Sheets(Sheets.Count)


    Set ws1 = ThisWorkbook.Worksheets("sheet 2")
    ws1.Copy ThisWorkbook.Sheets(Sheets.Count)

    End Sub

    it shows error why ?

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet from one to new sheet

    Please use code tags with your code.

    If you want to copy all sheets within a book, you need to loop through each sheet. If it is a single sheet, you need to sheet's name with the copy method

  3. #3
    Registered User
    Join Date
    06-05-2013
    Location
    paris
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: copy sheet from one to new sheet

    can you please give me the code .

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet from one to new sheet

    Which code?
    Please Login or Register  to view this content.

+ 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