+ Reply to Thread
Results 1 to 3 of 3

Delete Sheets Crashes Excel - Repeatable Example attached - 2010

  1. #1
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Delete Sheets Crashes Excel - Repeatable Example attached - 2010

    Hi,

    After DAYS of head scratching - i have finally isolated a repeatable bug in my application. Strangely this combination of code has existed in my app for AGES and has not caused problems before, all of a sudden it has (i cannot pinpoint the change elsewhere in my app that has caused it to start happening all of a sudden)

    I have managed to extract the code to a workbook and hopefully you will be able to repeat my experiment;

    In Module 1 of the attached workbook is a simple macro to delete a worksheet
    In Module 2 is a UDF

    On Sheet "Copy2" there is a button that calls the delete macro - hit this button and excel will crash. It is the UDF that is doing it. If you comment out the UDF in Module 2 and repeat the experiment, the delete macro should run fine!!

    Anyone know how i can prevent this from crashing Excel but still retain functionality of the UDF?

    Cheers,
    K

  2. #2
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: Delete Sheets Crashes Excel - Repeatable Example attached - 2010

    AttachmentExample for Crash.xlsm

  3. #3
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: Delete Sheets Crashes Excel - Repeatable Example attached - 2010

    For anyone else who comes across this thread - i made some changes to the function - took out the volatile statement and wrapped an IF around it - excel no longer crashes

    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. Excel 2010 Crashes Whenever Worksheet Tab is Renamed
    By jelarv in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2014, 01:08 PM
  2. Replies: 1
    Last Post: 02-24-2014, 03:16 AM
  3. Replies: 4
    Last Post: 10-21-2013, 02:55 PM
  4. Excel 2010 crashes when macros are enabled
    By meera77c in forum Excel General
    Replies: 6
    Last Post: 09-05-2012, 08:36 AM
  5. Loop Macro Crashes excel 2010
    By jmoon3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2012, 07:57 PM
  6. MS Excel 2010 crashes
    By Richard_G in forum Excel General
    Replies: 0
    Last Post: 07-11-2011, 08:57 AM
  7. MS Excel 2010 crashes
    By Richard_G in forum Excel General
    Replies: 1
    Last Post: 06-25-2011, 12:18 PM

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