+ Reply to Thread
Results 1 to 4 of 4

How to copy or move sheets by using VBA code in Excel for Windows

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    6

    How to copy or move sheets by using VBA code in Excel for Windows

    I have used the following code:


    Sub Create_New_Sheet()
    '
    '
    Sheets("DEC (3)").Select
    Sheets("DEC (3)").Copy Before:=Sheets(1)
    Range("A1").Select
    ActiveWorkbook.Save
    End Sub

    This is vulnerable to the name of the sheet.
    The macro code I need, should duplicate the irrespective of the sheet name, i.e., from the active sheet.

    Gurus Please help...


  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,844

    Re: How to copy or move sheets by using VBA code in Excel for Windows

    hello aryan_vivek. Try:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    6

    Talking Re: How to copy or move sheets by using VBA code in Excel for Windows

    Yes that WORKED Perfectly. Thanks a TON

  4. #4
    Registered User
    Join Date
    07-03-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How to copy or move sheets by using VBA code in Excel for Windows

    Thank you...
    Last edited by aryan_vivek; 12-06-2012 at 02:32 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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