+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Macro portability between versions of Excel

  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    1

    Angry Macro portability between versions of Excel

    I have successfully written a large macro for an XL2007 spreadsheet running on Vista Ultimate.

    When I come to save for 97-2003 it will not save and produces an error message to offer to save elsewhere which also fails. It still saves correctly if I do a 2007 save.

    I have taken the code and spreadsheet separately to an XP machine and recreated the spreadsheet but it does not work correctly because of the different format of commands in XL2007.

    Is there some kind of conversion routine or do I have to go back and write only in XP/97-2003 code so that my spreadsheet is truly portable?


    I have done more work on this with different versions and find that there are significant changes in Excel VBA for 64bit Vista. My code wouldn't work on 32bit vista!!

    Definitely "shg", you are right, we need to write for the lowest versions you want it to run on, but how do you find out what these are other than by developing on them and testing every version up to the latest - a lot of work. Most applications have a conversion routine to manage such things but I guess it is being a little hopeful to expect such a thing from Microsoft.

    This thread can be closed but others beware - it can be a day's work to redevelop your spreadsheet.
    Last edited by helen mckee; 04-07-2009 at 12:41 AM. Reason: Further Information

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro portability between versions of Excel

    You should write for the lowest version you need to support, with some care to ensure forward compatibility -- for example, Application.FileSearch is not supported in Excel 2007.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-21-2009
    Location
    New York City
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Macro portability between versions of Excel

    There is a forward compatibility problem with VBA from excel 2003 to excel 2007. So even when you save your 2007 file as a 97-03 file, it loses the macros. Alas, if you write it for 2003, the the 2007 users will not be able to use it.

    Check out these threads. I think your problem is essentially the same.

    http://www.excelforum.com/excel-2007...th-2007-a.html

    http://www.excelforum.com/excel-2007...atibility.html

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro portability between versions of Excel

    So even when you save your 2007 file as a 97-03 file, it loses the macros. Alas, if you write it for 2003, the the 2007 users will not be able to use it.
    That's not correct. If you save a (macro-enabled) .xlsm file to xls, the macros go with it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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