+ Reply to Thread
Results 1 to 6 of 6

Excel Crash Upon Running Macro

  1. #1
    Registered User
    Join Date
    12-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    11

    Excel Crash Upon Running Macro

    Hello guys! I'm having a problem. Literally out of nowhere, one of my macros is crashing excel (turns to not responding) upon execution. The part that is stumping me is I didn't change anything from the last time I used the code (which worked flawlessly), and my colleague CAN run the code on his computer without any problems. Did something change in my computer settings? It's not giving me a error when I attempt to run macro, however when I sent the workbook via email and tried to open it, I got "Error in loading DLL", which i've researched and troubleshot to no avail. Thanks for any ideas fellas

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Excel Crash Upon Running Macro

    I doubt it is the cause, but you really should try to avoid all those select... activecell switches... instead of code like:

    Please Login or Register  to view this content.
    use
    Please Login or Register  to view this content.
    That applies to almost the whole macro including .style .interior, etc., and with that much going on, it may or may not solve it, but it should make some improvement.
    Turning off displayalerts is also not very common unless doing it for a specific reason.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Excel Crash Upon Running Macro

    In VBA editor, check references... are any marked "missing"? It is possible that there is a reference from a newer excel version, and you may need to remove the reference and add an earlier version.

  4. #4
    Registered User
    Join Date
    12-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Excel Crash Upon Running Macro

    Arkadi,

    One is "Missing: Microsoft Outlook 16.0 Object Library" ... should I uncheck this?
    Last edited by jeffreybrown; 05-12-2017 at 04:13 PM. Reason: Removed full quote. Not necessary.

  5. #5
    Registered User
    Join Date
    12-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Excel Crash Upon Running Macro

    Quote Originally Posted by Arkadi View Post
    I doubt it is the cause, but you really should try to avoid all those select... activecell switches... instead of code like:

    Please Login or Register  to view this content.
    use
    Please Login or Register  to view this content.
    That applies to almost the whole macro including .style .interior, etc., and with that much going on, it may or may not solve it, but it should make some improvement.
    Turning off displayalerts is also not very common unless doing it for a specific reason.
    Yeah good call thanks for the tip. I'll try to make that change, but again my colleague right next to me is running the macro perfectly fine

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Excel Crash Upon Running Macro

    The missing reference is probably the source of the dll error. Yes I'd uncheck it.. Different office versions will reference different libraries, but newer versions are backwards compatible so if you do need the outlook library add a reference to 15 (which corresponds to office 2010) instead of 16 and it should work on later versions too.

    As for working on a colleagues machine but not yours, sometimes freezing or hanging are caused by issues that are not code related... RAM amount, or harware issues, cpu, corrupted software, can all play a role. Making the changes may not solve the issue but makes the code better, and if you are lucky helps the problem. If the above dont help we can dig deeper.

+ 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. The custom sort list causes my excel to crash after running and then trying to save
    By jonnytales in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-02-2024, 02:22 PM
  2. Macro Causes Excel to Crash (But Only Sometimes)
    By js0873 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2016, 02:59 PM
  3. [SOLVED] VBA Macro causes excel to crash
    By BoundToExcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2015, 10:28 AM
  4. App Crash when running Macros - Anyone know cause?
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2015, 05:33 PM
  5. [SOLVED] Excel crash - bug macro?
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2005, 06:55 AM
  6. Prevent Excel crash when running
    By rauxalacch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2005, 02:10 AM
  7. Excel VBA macro crash
    By Patrick in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2005, 11: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