Differences & Incompatibilities Across Versions

  • Hello,


    I may be creating a small Excel-based VBA application for a client on a semi-formal basis. I personally use Windows XP with Office XP installed, but I'm concerned about the possibility of serious differences between versions of Windows and Excel that may cause my code to fail on other machines.


    I don't think I need to cater to any version of Excel BEFORE that in Office XP, but I probably do need to cater for versions after it. That's Office 2003, Office 2007 and Office for Vista, I think.


    Does anyone either know of a good concise reference that details any possible pitfalls, or can anyone give any examples here of common things to avoid.


    Or, am I worrying too much, and is everything supposed to be pretty much compatible!? (That would be far too easy, I'm sure!)


    Thanks in advance!

  • Re: Differences & Incompatibilities Across Versions


    Thanks for the responses. In general then, it sounds like I can expect my code to work in newer versions of Excel. That's good to know. Thanks!

  • Re: Differences & Incompatibilities Across Versions


    That's not a safe assumption. I am no expert on the matter, because my development for Excel 2007 has been fairly minimal, but at least some Chart-manipulation code in our legacy VBA app broke when our payroll department upgraded to Excel 2007.


    The ticket didn't get assigned to me, so I don't know details. However it seems it's not 100% backwards-compatible.


    Also try to use Sheet.Rows.Count and Sheet.Columns.Count instead of hard coded values 65536 and 256, because Excel 2007 supports larger worksheets.


    Any XML-manipulation code will have likely changed between 2003 and 2007 as well, because the Excel 2007 document type is now native XML, and doesn't require binary transformation.


    Creating custom menus will need to be handled differently for the Excel 2007 RibbonX interface.


    Here's just some things you should watch out for.

  • Re: Differences & Incompatibilities Across Versions


    Thanks so much for the tips, Fencliff. I don't think the XML issue will bother me, and I generally use Sheet.Rows.Count etc. already anyway. However, the custom menus issue is possibly an stumbling block.


    Does that mean that adding menu items to existing Excel menus (like the 'Cells' menu, for example), will break on 2007? Could you point me in the direction of more information about this?


    Thanks,

  • Re: Differences & Incompatibilities Across Versions


    MACs: For what it's worth, I've had one of my apps used by both PC and MAC users. In general the VBA code ported well, except I found that the MAC needed Application. placed in front of WorksheetFunction. for some worksheet functions to be recognized. One user upgraded her MAC to Office 8 (which does not support VBA) and sure enough everything came to a grinding halt. She put both the old and new Office versions on her machine and the old one stills runs the code fine.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!