+ Reply to Thread
Results 1 to 6 of 6

ClearContent Macro causing Excel crash.

  1. #1
    Registered User
    Join Date
    06-10-2013
    Location
    Columbus, OH
    MS-Off Ver
    Excel 2011 Mac
    Posts
    50

    ClearContent Macro causing Excel crash.

    Have a code to clear contents on one of my worksheets and it continually causes excel to freeze and forces me to exit the program. When the button is selected it takes approx. 30-45 seconds to clear the data and then excel freezes up. The code is as follows:

    Sub()

    Sheets("Sheet1").Range("B2:D16000").ClearContents

    End Sub


    The data in the range B2:D16000 comes from another macro that copies and pastes values to this sheet. I am also working on the mac 2011 version. Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: ClearContent Macro causing Excel crash.

    Hi,

    Are there any Sheet Change event macros?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: ClearContent Macro causing Excel crash.

    Hi, not familiar with the mac 2011 version, but would it work better if you tried the following:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-10-2013
    Location
    Columbus, OH
    MS-Off Ver
    Excel 2011 Mac
    Posts
    50

    Re: ClearContent Macro causing Excel crash.

    ill try that berlan.

    what do you mean by sheet change event macros? Im an excel noob

  5. #5
    Registered User
    Join Date
    06-10-2013
    Location
    Columbus, OH
    MS-Off Ver
    Excel 2011 Mac
    Posts
    50

    Re: ClearContent Macro causing Excel crash.

    berlan, froze on me again with the code you suggested and the status bar never appeared either. this is beyond frustrating. this is the only macro that causes the freeze. other macros may take a while to calc but they never shut down excel

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: ClearContent Macro causing Excel crash.

    Quote Originally Posted by Phily915 View Post
    ill try that berlan.

    what do you mean by sheet change event macros? Im an excel noob
    Hi,

    A sheet change event macro is simply a macro that is run whenever you make a change to a particular sheet. If you have any sheet change event macros (see in the VBE for that particular sheet) it will depend what that macro is doing as to whether it's a candidate for your problem.

    In the range being cleared are there any conditional formats?

+ 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. [SOLVED] Issue w/dynamic named range causing Excel to crash
    By plasmas222 in forum Excel General
    Replies: 10
    Last Post: 03-07-2014, 08:18 PM
  2. Before_Close code causing excel to crash and burn
    By quirkylwj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2013, 12:08 PM
  3. VBA Macro Causing Excel To Crash - Can it Be More Efficient?
    By LoggersAW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2013, 08:49 PM
  4. Simple macro (ClearContent) freezes Excel
    By bokodilaszlo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2006, 09:24 AM
  5. Macro Glitch Causing Crash
    By Danimagus in forum Excel General
    Replies: 1
    Last Post: 06-06-2005, 02:05 PM

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