+ Reply to Thread
Results 1 to 5 of 5

Excel 2010 VBA sheets(array(sheet1, )).copy command crashes excel - but not all the time.

Hybrid View

CJH@FSI Excel 2010 VBA... 10-18-2013, 12:43 PM
xladept Re: Excel 2010 VBA... 10-20-2013, 05:38 PM
CJH@FSI Re: Excel 2010 VBA... 10-21-2013, 04:50 AM
CJH@FSI Re: Excel 2010 VBA... 10-21-2013, 07:07 AM
xladept Re: Excel 2010 VBA... 10-21-2013, 02:55 PM
  1. #1
    Registered User
    Join Date
    10-18-2013
    Location
    Edinburgh
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Excel 2010 VBA sheets(array(sheet1, )).copy command crashes excel - but not all the ti

    No that's not it I'm afraid. I tried it again to make sure but there was no change. First time through fine, second time through catastrophe.

    Realised I hadn't checked the error message so gave it another go. This time with error handling switched off:

    First Error Message:

    Run-time error '-2147417848 (80010108)':
    Method 'Copy' of object 'Sheets' failed

    Selected debug and continued to step through code - got a 2nd Error Message on the same line:

    Run-time error '9':
    Subscript out of range

    Tried to step through a couple more times got the

    Run-time error '9':
    Subscript out of range

    error again then processing appeared to continue. However the new workbook was not saved & closed neither was the "template" work book closed as it should. The "processor" reopened the "template" workbook then froze. I killed it off.

    Gave it another go. Got the

    Run-time error '9':
    Subscript out of range

    error. It had created the new workbook but only the first four sheets in the list had been copied.

    Is there anything I need to reset in anyway between runs?

    Thanks again

    C
    Last edited by CJH@FSI; 10-21-2013 at 06:32 AM. Reason: Added more details

+ 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. Code works in Windows excel 2003 and 2010 but crashes in Mac excel 2011
    By kiweed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2012, 08:46 PM
  2. [SOLVED] Macro works but crashes Excel 2010
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-09-2012, 08:49 AM
  3. MS Excel 2010 crashes
    By Richard_G in forum Excel General
    Replies: 0
    Last Post: 07-11-2011, 08:57 AM
  4. MS Excel 2010 crashes
    By Richard_G in forum Excel General
    Replies: 1
    Last Post: 06-25-2011, 12:18 PM
  5. Code Crashes Excel 2010 but works in Excel 2003
    By aaronf316 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2011, 03:46 AM

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