XL2007 XML Lost with XL2003 & prior file save

W

Walt

Hi,

The last conditional compile related post I see was in 2005, so I'm
not optimistic there's a nice answer to this.

Let's say the user has installed Microsoft Office Compatibility Pack
for Word, Excel, and PowerPoint 2007 File Formats on an Office 2003
machine. If a user opens an Excel .xlsm file with a custom ribon
definition in Excel 2003, and saves it, it will be saved without it's
XML code and no longer be functional.

So, I put in an warning opening sheet/screen that I hide on workbook
open if application.version > 11. OK so far. So, user opens the
file in Excel 2003, sees the warning and closes the file. Without
thinking user clicks OK on closing query DG re. saving. File is
wrecked.

So, I put in a cancel = true if application.version < 12 in a workbook
before save sub. It won't run in Excel 2003 because all macros are
disabled by unrecognized variable types in the line 'Public Rib As
IRibbonUI' and, in the callbacks 'control As IRibbonControl' . The
user's inadvertant save proceeds to destroy the file.

QUESTIONS:
Can ribbon specific public and local variables and all the callback
code be placed in a #If, #Else, #EndIf conditional compile and hence
allow the backward compatible portion of the code to operate? What
constant would I use in the conditional compile? I see that VER is
not in the list of compiler constants.

Best Regards,
Walt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top