+ Reply to Thread
Results 1 to 4 of 4

Copy Multiple Sheets produces RunTime Error

  1. #1
    Registered User
    Join Date
    10-03-2013
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    34

    Copy Multiple Sheets produces RunTime Error

    Hi, I've been working on this code for quite some time now.
    I have seen it work most of the time but its very glitchy and produces a runtime error then closes all my excel windows.

    What I wanted to accomplish is to copy multiple sheets into a new workbook then save the file or send an email.

    The error starts at the line where i've declared the sheets (array) to be copied.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: Copy Multiple Sheets produces RunTime Error

    Hey moxman,

    try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I hope that helps.

    Thanks
    Lex

  3. #3
    Registered User
    Join Date
    10-03-2013
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Copy Multiple Sheets produces RunTime Error

    Hi lexusap!

    I have tried that code before. It used to be from the "record macro" script.

    It worked a couple times before but it is erratic and produces the runtime error '-2147417848 (800010108)

    Is there a way to copy multiple sheets without producing the error and crashing my excel.

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

    Re: Copy Multiple Sheets produces RunTime Error

    Please Login or Register  to view this content.
    You have the active workbook SET twice,wb and NewWb.
    If the sheet arrays are from the active sheet, perhaps you should include a reference to the active workbook
    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)

Similar Threads

  1. Copy/Paste Named Ranges but nothing happens, with no runtime error
    By dietcoke802 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2013, 11:54 AM
  2. Copy and Paste Runtime Error - Newbie, really struggling here!
    By lgjmac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2013, 05:43 PM
  3. Macro VBA Copy Paste Across Sheets Runtime '1004'
    By scrags in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2012, 01:23 PM
  4. Protected sheets w/macros giving runtime error 1004
    By cedarhill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2009, 07:59 AM
  5. [SOLVED] Runtime error with sheets.add
    By ittac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2005, 05:05 AM

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