Forum Discussion
Arvind Kaushik
Feb 17, 2017Copper Contributor
VBA Excel Code Compatible Error
Hi, I am facing the below mentioned error, The VBA code run perfectly in my system, While using the same macro to another system it shows the below mentioned error: "The error commonly occurs...
Chip Pearson
Apr 28, 2017Copper Contributor
A few quick checks. In VBA, go to the Tools menu, choose References, and make sure none are marked MISSING. Make sure you are not mixing 32-bit libraries with 64-bit libraries. If you're running Excel 32-bit and you try to load a 64-bit add-in, I'm not sure what will happen, I've never tried it, but it doesn't seem like a good idea. As you do a lot of editing, a great deal of internal trash code accumulates inside VBA's storage areas, and this can cause extremely bizarre problems. The solution is to export (use Export, not copy/paste) all VBA out to text files, purge all existing VBA, and then import the text files (use Import, not copy/paste). Or, just download Rob Bovey's CodeCleaner add-in from appspro.com and it will do all that in one click of the mouse. Are all the machines in question running 32-bit or 64-bit Excel, or is it a mix? If your code or code in a referenced libary is 64-bit and you're on 32-bit, you would likely see this error or get "undefined type" errors. Are they all Office 2015 or are they a mix. You might have to look at each reference on a problematic machine, get the file name, and compare the files on working and non-working machines. E.g, ensure build numbers and dates are the same, that sort of thing.
Bharat_Agrawal
Jul 04, 2019Copper Contributor
Chip Pearson - Please let me know if you have found any solution.