+ Reply to Thread
Results 1 to 6 of 6

Excel 2013 VBA Code not Backwards compatible with Excel 2010

  1. #1
    Registered User
    Join Date
    02-15-2018
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2013
    Posts
    12

    Excel 2013 VBA Code not Backwards compatible with Excel 2010

    I have written a full inventory management system in excel. It was intended to be used on multiple computers around my office, however I've only gotten it to work on Excel 2013. Unfortunately for me, my office computers have both. Is there a simple way around this or did i screw the pooch by writing my code in 2013?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,597

    Re: Excel 2013 VBA Code not Backwards compatible with Excel 2010

    What isn't working on 2010 that is working on 2013?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    02-15-2018
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Excel 2013 VBA Code not Backwards compatible with Excel 2010

    I didn't have time to fully look at the problem, but it looked like it was mostly Compile Errors: Can't find Project or Library.

    Also seemed to mostly be in my standalone userform calendar, which is opened by another userform. It works without issue on Excel 2013, so I was wondering if it was common for VBA codes to not be backwards compatible between the two.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,597

    Re: Excel 2013 VBA Code not Backwards compatible with Excel 2010

    For a start try this:

    1 Open the file in Excel 2010.

    2 Goto Tools>References...

    3 If anything is marked as MISSING note its name and uncheck it.

    4 Close and save the file.

    5 Re-open the file and try the code again.

    Now, you mention a calendar on a userform, how was that calendar created?

  5. #5
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Excel 2013 VBA Code not Backwards compatible with Excel 2010

    As mentioned, missing references/libraries can usually be corrected.

    Its also possible to write the code using late binding instead of early binding, which usually is a better approach when in a mixed environment.

    Also, VBA (and code in general) is not one size fits all. Just because it works in 1 version (or even subversion) does not mean it will work in another. The only sure fire way to ensure it works in all versions being used is to test it and make adjustments until it works in all versions.

    I find in situations where my code is:
    • Complex
    • Used accross multiple versions

    That it benefits me to write my code as modular as possible. By doing so its easier to adjust or replace small segments of code when the need arises instead of digging through a huge module of code.

    It sounds like you have some troubleshooting ahead of you.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  6. #6
    Registered User
    Join Date
    02-15-2018
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Excel 2013 VBA Code not Backwards compatible with Excel 2010

    It ended up being Missing references. Thanks for the input.

    I agree I have some troubleshooting ahead. It seems to be working on some Excel 2010's but not others.

    Anyway I appreciate the input everyone.

+ 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. VBA Code working in Excel 2010 but not in 2013 or 16
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-12-2016, 10:48 AM
  2. Late binded VBA Code working in Excel 2013 but not Excel 2010
    By daruki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2015, 06:03 PM
  3. VBA Code Works in Excel 2010 but not Excel 2013
    By drewmey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2015, 07:17 PM
  4. Macro code working fine in excel 2013 but not in excel 2010.
    By sere in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2014, 02:23 AM
  5. Quick Question / Is Excel 2013 VBA backward compatible?
    By akaytie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2014, 05:30 AM
  6. Replies: 4
    Last Post: 07-18-2014, 02:05 AM
  7. Code created in Excel 2010 does not work with Excel 2013
    By Steve@Rugby in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2014, 10:14 AM

Tags for this Thread

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