Consulting

Results 1 to 3 of 3

Thread: Copying sheets multiple times in the same workbook

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    37
    Location

    Question Copying sheets multiple times in the same workbook

    Is there any way to Copy a worksheet multiple times in the same workbook at once?

  2. #2
    VBAX Regular HaHoBe's Avatar
    Joined
    Aug 2004
    Location
    Hamburg
    Posts
    89
    Location
    Hi, mugcy,

    using VBA and a loop:

    Sub mugcy()
    'uses internal Sheetname
    
    Dim lngCounter As Long
    Const clngCOPY_SHEET As Long = 4
    
    For lngCounter = 1 To clngCOPY_SHEET
       Sheet1.Copy after:=Worksheets(Worksheets.Count)
       'Sheets("mugcy").Copy after:=Worksheets(Worksheets.Count)
       ActiveSheet.Name = "New " & Format(Worksheets.Count, "000_") & Format(Now, "yymmdd_hhnnss")
    Next lngCounter
    
    End Sub
    Ciao,
    Holger

  3. #3
    VBAX Regular
    Joined
    Mar 2009
    Posts
    37
    Location
    Thank you Very much

Posting Permissions

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