+ Reply to Thread
Results 1 to 15 of 15

Macros Crashing Excel / Cannot Access VBA References

  1. #1
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Macros Crashing Excel / Cannot Access VBA References

    Hello everyone,

    I have a critical spreadsheet that has started acting up. It will open just fine, but when you try to save the spreadsheet or click on "Macros" on the Developer tab, excel crashes. I wanted to take a look at the references, but when I do that, one of my modules is causing the VBA screen to act weird. I can click around the VBA screen however none of the module windows will show any code. I can click tools then references, but nothing happens. I can close module windows EXCEPT for module 2. So that window is clearly the culprit.

    Does anyone have any suggestions??
    Last edited by mvparker79; 04-06-2017 at 04:24 PM.

  2. #2
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: Macros Crashing Excel / Cannot Access VBA References

    Never mind everyone!! I had a stroke of genius. But for anyone who runs in to a similar issue this is how I resolved my issue.

    1) I copied my "corrupted" file and pasted it in a new location. Doesn't matter where. This caused Excel to not immediately enable the macros.
    2) I opened the file in the new location but did NOT enable macros.
    3) Access VBA screen (Alt + F11)
    4) Go to Tools -> References
    5) Unchecked Microsoft Office 15.0 Object Library and OLE Automation
    6) Press OK. Close VBA screen. Save the file.

    Done-zo.

  3. #3
    Registered User
    Join Date
    05-17-2019
    Location
    Cannes, France
    MS-Off Ver
    Office365
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    Great thanks to you to share the solution!
    Save my life...

  4. #4
    Registered User
    Join Date
    05-16-2019
    Location
    Bratislava
    MS-Off Ver
    2010
    Posts
    4

    Re: Macros Crashing Excel / Cannot Access VBA References

    Brilliant solution, you're absolutely great, thank you so much. You've saved my neck ))))

    Quote Originally Posted by mvparker79 View Post
    Never mind everyone!! I had a stroke of genius. But for anyone who runs in to a similar issue this is how I resolved my issue.

    1) I copied my "corrupted" file and pasted it in a new location. Doesn't matter where. This caused Excel to not immediately enable the macros.
    2) I opened the file in the new location but did NOT enable macros.
    3) Access VBA screen (Alt + F11)
    4) Go to Tools -> References
    5) Unchecked Microsoft Office 15.0 Object Library and OLE Automation
    6) Press OK. Close VBA screen. Save the file.

    Done-zo.

  5. #5
    Registered User
    Join Date
    12-18-2019
    Location
    Melbourne
    MS-Off Ver
    365
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    This is brilliant!

    mvparker79 you have saved my rear end. Thank you.

  6. #6
    Registered User
    Join Date
    01-09-2020
    Location
    Ottawa, Canada
    MS-Off Ver
    Office 365 (Excel Mac 16.xx)
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    Thank-you very much! This answer is still relevant as of Jan 2020, although the exact library to turn off is different.

    In my case, the VBA editor/debugger would crash randomly regardless of whether i was editing or executing my code.
    It got so bad I was saving after every single edit, before I tried to execute the code again.

    To implement your fix, I didn't need to disable macros. I just went to Tools->References and unchecked Microsoft Office 16.0 Object Library (OLE Automation was already off). And I have now gone an hour without a crash. Woo hoo!

    Here is what my Tools=>Reference now looks like after I unticked Microsoft Office 16 Object Library:
    ToolsReference.png

    Just posting this so anyone following will know the exact library to disable may be different.
    Mark

    Quote Originally Posted by mvparker79 View Post
    Never mind everyone!! I had a stroke of genius. But for anyone who runs in to a similar issue this is how I resolved my issue.

    1) I copied my "corrupted" file and pasted it in a new location. Doesn't matter where. This caused Excel to not immediately enable the macros.
    2) I opened the file in the new location but did NOT enable macros.
    3) Access VBA screen (Alt + F11)
    4) Go to Tools -> References
    5) Unchecked Microsoft Office 15.0 Object Library and OLE Automation
    6) Press OK. Close VBA screen. Save the file.

    Done-zo.
    Last edited by MarkB-C; 01-10-2020 at 04:53 PM. Reason: Update image, clarify image description

  7. #7
    Registered User
    Join Date
    03-09-2020
    Location
    Indonesia
    MS-Off Ver
    office365
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    Quote Originally Posted by mvparker79 View Post
    Never mind everyone!! I had a stroke of genius. But for anyone who runs in to a similar issue this is how I resolved my issue.

    1) I copied my "corrupted" file and pasted it in a new location. Doesn't matter where. This caused Excel to not immediately enable the macros.
    2) I opened the file in the new location but did NOT enable macros.
    3) Access VBA screen (Alt + F11)
    4) Go to Tools -> References
    5) Unchecked Microsoft Office 15.0 Object Library and OLE Automation
    6) Press OK. Close VBA screen. Save the file.

    Done-zo.

    THANK YOU, you've helped me brilliantly
    Last edited by melkihassa; 03-09-2020 at 07:11 PM. Reason: Adding reference to the person I'm replying to

  8. #8
    Registered User
    Join Date
    03-17-2020
    Location
    Canada
    MS-Off Ver
    MS Office Pro Plus 2019
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    I registered on this forum just to thank you. This tip is a big time-saver. Thank you!

  9. #9
    Registered User
    Join Date
    10-15-2015
    Location
    Montego Bay, Jamaica
    MS-Off Ver
    Office 2010
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    Quote Originally Posted by mvparker79 View Post
    Never mind everyone!! I had a stroke of genius. But for anyone who runs in to a similar issue this is how I resolved my issue.

    1) I copied my "corrupted" file and pasted it in a new location. Doesn't matter where. This caused Excel to not immediately enable the macros.
    2) I opened the file in the new location but did NOT enable macros.
    3) Access VBA screen (Alt + F11)
    4) Go to Tools -> References
    5) Unchecked Microsoft Office 15.0 Object Library and OLE Automation
    6) Press OK. Close VBA screen. Save the file.

    Done-zo.
    A flash of brilliance, mixed with a dash of kindness. Thanks for sharing.

  10. #10
    Registered User
    Join Date
    08-08-2019
    Location
    Gauteng, South Africa
    MS-Off Ver
    Office 2016
    Posts
    1

    Smile Re: Macros Crashing Excel / Cannot Access VBA References

    Still working perfectly as of December 2020 as well.

    Would however like to know the cause of this though and perhaps a permanent resolve by fixing the Office Library perhaps.

    I ask this due to the fact that any future Macro Enabled Macro file on this machine would need to be resolved in this manner too.

    But still, thanks for this solution.

  11. #11
    Registered User
    Join Date
    06-04-2020
    Location
    India
    MS-Off Ver
    2013
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    Quote Originally Posted by mvparker79 View Post
    Never mind everyone!! I had a stroke of genius. But for anyone who runs in to a similar issue this is how I resolved my issue.

    1) I copied my "corrupted" file and pasted it in a new location. Doesn't matter where. This caused Excel to not immediately enable the macros.
    2) I opened the file in the new location but did NOT enable macros.
    3) Access VBA screen (Alt + F11)
    4) Go to Tools -> References
    5) Unchecked Microsoft Office 15.0 Object Library and OLE Automation
    6) Press OK. Close VBA screen. Save the file.

    Done-zo.
    You just saved me from re-building new file from scratch.
    Thank you very much.

  12. #12
    Registered User
    Join Date
    03-31-2014
    Location
    Berwick, ME
    MS-Off Ver
    Excel 2010
    Posts
    15

    Smile Re: Macros Crashing Excel / Cannot Access VBA References

    I can't thank you enough! Was able to restore my file in time for my meeting with CEO. Bless you.

  13. #13
    Registered User
    Join Date
    02-09-2021
    Location
    Washington
    MS-Off Ver
    2016
    Posts
    1

    Re: Macros Crashing Excel / Cannot Access VBA References

    I can't say how many times I've had to restore my file to previous versions due to the "Can't find library" error. This solution was genius and fast!

  14. #14
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    605

    Re: Macros Crashing Excel / Cannot Access VBA References

    Thank you very much,

    Worked for me too.
    Appreciate the help? CLICK *

  15. #15
    Registered User
    Join Date
    09-27-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macros Crashing Excel / Cannot Access VBA References

    Following quicker approach worked for me:
    1. Disable Macros
    2. Open buggy file - VBA code should appear now
    3. Save file off under another name
    4. Enable macros, close Excel and reopen the new file

+ 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 Crashing & Operating Very Slow After Inserting VLOOKUPS and MACROS
    By nathandavies9 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-23-2017, 10:00 AM
  2. Excel crashing when trying to view code before macro run; not crashing after first run
    By goonerforlyf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2015, 05:27 PM
  3. Macros crashing Excel 2013
    By Thor42 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2015, 05:13 PM
  4. Macros written in Excel 2010 (PC) crashing Excel 2011 (Mac)
    By kilet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2014, 09:02 AM
  5. Excel 2010 crashing when running macros....my code?
    By dietcoke802 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2013, 05:56 PM
  6. Simple Macros Crashing Excel
    By Jakobi in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-12-2011, 11:19 AM
  7. Replies: 1
    Last Post: 01-16-2009, 09: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