Home

VBA Excel Code Compatible Error

%3CLINGO-SUB%20id%3D%22lingo-sub-46744%22%20slang%3D%22en-US%22%3EVBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46744%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20facing%20the%20below%20mentioned%20error%2C%20The%20VBA%20code%20run%20perfectly%20in%20my%20system%2C%20While%20using%20the%20same%20macro%20to%20another%20system%20it%20shows%20the%20below%20mentioned%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22The%20error%20commonly%20occurs%20when%20code%20is%20incompatible%20with%20the%20version%2C%20platform%2C%20or%20architecture%20of%20this%20application.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20really%20very%20frustrated%20with%20this%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20Simple%20VBA%20code%20also%20prodcuced%26nbsp%3Berror%20e.g.%20I%20simple%20use%20Command%20button%20on%20the%20sheet%20and%20use%20Msgbox%20%22Hi%22.%3C%2FP%3E%3CP%3ENow%20the%20probelm%20is%20that%20This%26nbsp%3B%20works%20fine%20in%20my%20system.%20But%20when%20I%20send%20this%20workbook%20to%26nbsp%3Bsomeone%20else%20in%20my%20team%20then%20it%26nbsp%3Bshows%20the%20above%20mentioned%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20following%20in%20the%20users%20system%3A-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20Delete%20*.EXD%20files%20in%20the%20user's%20temp%20folder%3C%2FP%3E%3CP%3E2.%20re-install%20excel%20and%26nbsp%3B%20windows%2C%26nbsp%3B%26nbsp%3Bthe%20same%20platform%20I%20have.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20developed%20N%20numbers%20of%20VBA%26nbsp%3Bautomations%20but%20at%20some%20workstations%20my%20code%20procuded%20the%20above%20mentioned%20error%20and%20at%20some%20workstations%20it%20workes%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20resolve%20this%20problem%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EArvind%20Kaushik%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-46744%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20Desktop%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20%26amp%3B%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-737549%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-737549%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F53035%22%20target%3D%22_blank%22%3E%40Chip%20Pearson%3C%2FA%3E%26nbsp%3B%20%26nbsp%3B-%20Please%20let%20me%20know%20if%20you%20have%20found%20any%20solution.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-65703%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-65703%22%20slang%3D%22en-US%22%3EA%20few%20quick%20checks.%20In%20VBA%2C%20go%20to%20the%20Tools%20menu%2C%20choose%20References%2C%20and%20make%20sure%20none%20are%20marked%20MISSING.%20Make%20sure%20you%20are%20not%20mixing%2032-bit%20libraries%20with%2064-bit%20libraries.%20If%20you're%20running%20Excel%2032-bit%20and%20you%20try%20to%20load%20a%2064-bit%20add-in%2C%20I'm%20not%20sure%20what%20will%20happen%2C%20I've%20never%20tried%20it%2C%20but%20it%20doesn't%20seem%20like%20a%20good%20idea.%20As%20you%20do%20a%20lot%20of%20editing%2C%20a%20great%20deal%20of%20internal%20trash%20code%20accumulates%20inside%20VBA's%20storage%20areas%2C%20and%20this%20can%20cause%20extremely%20bizarre%20problems.%20The%20solution%20is%20to%20export%20(use%20Export%2C%20not%20copy%2Fpaste)%20all%20VBA%20out%20to%20text%20files%2C%20purge%20all%20existing%20VBA%2C%20and%20then%20import%20the%20text%20files%20(use%20Import%2C%20not%20copy%2Fpaste).%20Or%2C%20just%20download%20Rob%20Bovey's%20CodeCleaner%20add-in%20from%20appspro.com%20and%20it%20will%20do%20all%20that%20in%20one%20click%20of%20the%20mouse.%20Are%20all%20the%20machines%20in%20question%20running%2032-bit%20or%2064-bit%20Excel%2C%20or%20is%20it%20a%20mix%3F%20If%20your%20code%20or%20code%20in%20a%20referenced%20libary%20is%2064-bit%20and%20you're%20on%2032-bit%2C%20you%20would%20likely%20see%20this%20error%20or%20get%20%22undefined%20type%22%20errors.%20Are%20they%20all%20Office%202015%20or%20are%20they%20a%20mix.%20You%20might%20have%20to%20look%20at%20each%20reference%20on%20a%20problematic%20machine%2C%20get%20the%20file%20name%2C%20and%20compare%20the%20files%20on%20working%20and%20non-working%20machines.%20E.g%2C%20ensure%20build%20numbers%20and%20dates%20are%20the%20same%2C%20that%20sort%20of%20thing.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-47153%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-47153%22%20slang%3D%22en-US%22%3EThanks%20A%20lot%2C%20I%20never%20tried%20this%20option%2C%20I%20will%20try%20this%20and%20let%20you%20know%20if%20error%20still%20persist.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-47105%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-47105%22%20slang%3D%22en-US%22%3E%3CP%3EHere's%20something%20you%20can%20try%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20VBA%20editor%20launch%20the%20Compile%20command%20from%20the%20menu%20and%20then%20check%20the%20References%20dialog%20to%20see%20if%20there%20is%20anything%20missing%20and%20if%20so%20try%20to%20add%20these%20libraries.%3C%2FP%3E%3CP%3EIn%20general%20it%20seems%20to%20be%20good%20practice%20to%20compile%20the%20complete%20VBA%20code%20and%20then%20saving%20the%20document%20before%20distribution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Esource%20(and%20other%20suggestions%20at)%3A%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fstackoverflow.com%2Fquestions%2F507191%2Fcant-find-project-or-library-for-standard-vba-functions%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F507191%2Fcant-find-project-or-library-for-standard-vba-functions%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-47089%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-47089%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EF8%20Key%20(next%20step)%20shows%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20all%20are%20using%20the%20Windows%208%20and%20ms%20office%202013%20version%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F10985iE6A419D170C3812C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22F1%20Error.jpg%22%20title%3D%22F1%20Error.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20327px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F10984i21E6FF585E34007F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22F8.jpg%22%20title%3D%22F8.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BRegards%2C%3C%2FP%3E%3CP%3EArvind%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-47055%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-47055%22%20slang%3D%22en-US%22%3E%3CP%3EWhat%20suggestions%20do%20you%20get%20when%20you%20click%20the%20Help%20button%20in%20that%20error%20message%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20happens%20if%20you%20step%20through%20the%20code%20on%20the%20other%20person's%20machine%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20is%20your%20OS%20and%20Excel%20version%20exactly%3F%3C%2FP%3E%3CP%3EWhat%20is%20the%20other%20person's%20OS%20and%20Excel%20version%20exactly%3F%20Don't%20just%20say%20%22the%20same%22.%20Detail%20it.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46748%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20Excel%20Code%20Compatible%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46748%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20attaching%20the%20Error%20Screenshot...%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F10926i34A7CDBA85AF9DF0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Error.jpg%22%20title%3D%22Error.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EArvind%20Kaushik%3C%2FP%3E%3C%2FLINGO-BODY%3E
Arvind Kaushik
New Contributor

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 when code is incompatible with the version, platform, or architecture of this application."

 

I am really very frustrated with this error.

 

Even Simple VBA code also prodcuced error e.g. I simple use Command button on the sheet and use Msgbox "Hi".

Now the probelm is that This  works fine in my system. But when I send this workbook to someone else in my team then it shows the above mentioned error.

 

I have tried following in the users system:-

 

1. Delete *.EXD files in the user's temp folder

2. re-install excel and  windows,  the same platform I have.

 

I have developed N numbers of VBA automations but at some workstations my code procuded the above mentioned error and at some workstations it workes fine.

 

Can anyone resolve this problem?  

 

Regards,

Arvind Kaushik

7 Replies

Hi,

 

I am attaching the Error Screenshot...

Error.jpg

Regards,

Arvind Kaushik

What suggestions do you get when you click the Help button in that error message?

 

What happens if you step through the code on the other person's machine?

 

What is your OS and Excel version exactly?

What is the other person's OS and Excel version exactly? Don't just say "the same". Detail it. 

Hi,

 

F8 Key (next step) shows:

 

We all are using the Windows 8 and ms office 2013 version

 

F1 Error.jpgF8.jpg

 

 

 Regards,

Arvind

Here's something you can try:

 

In the VBA editor launch the Compile command from the menu and then check the References dialog to see if there is anything missing and if so try to add these libraries.

In general it seems to be good practice to compile the complete VBA code and then saving the document before distribution.

 

source (and other suggestions at): http://stackoverflow.com/questions/507191/cant-find-project-or-library-for-standard-vba-functions

Thanks A lot, I never tried this option, I will try this and let you know if error still persist.
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.

@Chip Pearson   - Please let me know if you have found any solution. 

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies