none
Excel 2010 64 bit randomly crashing when running macros created in 32bit excel. RRS feed

  • Question

  • Since we switched to 64 bit excel, we have a number of files that crash when running a macro. 99% of the time this is when we are running a macro that opens another file. If we open the file that the macro is trying to open on a 32bit machine, it opens fine and we are able to open it again in 64 bit. This only lasts so long and at some point it will crash again. I've read 2010 32 bit works better than 64 bit but we really need to capabilities of 64 bit.  I ran the VBA Inspector but I'm not an expert so I'm trying to decipher what makes sense and my IT dept is not well versed in excel or VBA. Here's is an example that came up for one of the files that occasionally causes my excel to crash:

    '<VBA_INSPECTOR>
        '   <CHANGE>
        '       <MESSAGE>Potentially contains changed items in the object model</MESSAGE>
        '       <ITEM>[xls]Workbooks.Open</ITEM>
        '       <URL>http://go.microsoft.com/fwlink/?LinkID=215357 </URL>
        '   </CHANGE>
        '</VBA_INSPECTOR>
        Workbooks.Open Filename:= _
    "T:\Munis\MIG\EOD PRICING\EOD Marks Template.csv" 
        '<VBA_INSPECTOR>
        '   <CHANGE>
        '       <MESSAGE>Potentially contains changed items in the object model</MESSAGE>
        '       <ITEM>[xls]ChartArea.ClearContents</ITEM>
        '       <URL>http://go.microsoft.com/fwlink/?LinkID=215357 </URL>
        '   </CHANGE>
        '</VBA_INSPECTOR>
        Sheets("EOD Marks Template").Cells.ClearContents

    Windows("Portfolios All.xlsm").Activate 
        Sheets("EOD Marks").Select

    Thursday, April 6, 2017 2:16 PM

All replies

  • I assume the same file is not open by 2 applications at the same time.  You might want to check that the file is not locked before you open it. 
    Thursday, April 6, 2017 3:21 PM
  • It's not open anywhere else. 
    Thursday, April 6, 2017 4:42 PM
  • Do the files include any additional references and / or do they include any APIs?
    Friday, April 7, 2017 8:38 AM
    Moderator
  • You cant use Common controls in x64 and all procedure you shouls change code on APIs

    Thats why I and most of my friends, do not use x64 version at all.

    But in youre text I can find a links.

    http://go.microsoft.com/fwlink/?LinkID=215357 and https://msdn.microsoft.com/en-us/library/ee836187.aspx is about Object versions - change referents from controls on late binding. Propably You use word or Outlook objects older version in your code.


    Oskar Shon, Office System MVP - www.VBATools.pl
    if Helpful; Answer when a problem solved

    Friday, April 7, 2017 2:54 PM
    Answerer