Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet that is to be useable in both Excel 2007 and 2003. In
the 2007 version, there is customized Ribbon support. I have isolated all the ribbon callback functions in a separate VBA module, and it seems that when the spreadsheet is opened in Excel 2003 (which of course does not invoke any of the callback functions) that module is never compiled, and so everything works. Except: There is one place where I need to have code that might call one of the ribbon functions: In a Worksheet_Activate method, I need to invoke the IRibbonUI.Invalidate method when in 2007. Even though the code can test for the Application.Version and not call the invalidation procedure, the very presence of the statement that references that procedure makes VBA want to compile the module that has ribbon code in it. Of course, that doesn't work in Excel 2003 -- none of those objects is known. Is there any way to "trick" VBA in Excel 2003 into allowing code that references ribbon things to compile. I have no intention of actually calling or executing any of that code, but I can't figure out how to keep it from being referenced and thus causing compile errors. One obvious solution is to change the VBA code itself between the 2007 and 2003 versions of the spreadsheet. But the whole point here is to have a common set of stuff that works in both places, unchanged. Thanks, -don h -- Don H. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to protect excel workbook from macro starting from Developer - Code ribbon? | Excel Programming | |||
Modifying XLA to show toolbar in XL 2003 and ribbon tab in XL 2007 | Excel Programming | |||
Assign a Ribbon Control's Label from a Variable in VBA Code | Excel Programming | |||
Open Workbook Add In with 2007 & 2003, Which Changes Ribbon & Tool | Excel Programming | |||
Splitting up code ribbon | Excel Discussion (Misc queries) |