View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Gross Jim Gross is offline
external usenet poster
 
Posts: 2
Default Determining Office Version

I guess I'm out of luck too?

I have found that there are two different strategies needed to disable Excel's built-in menu/toolbar buttons depending upon Excel version. In Excel 2002, the property CommandBars.DisableCustomize must be used to prevent re-enabling the buttons through customization, thanks to changes including the new Toolbar Options feature and loss of the "Well" command bars in xlVBA. CommandBars.DisableCustomize does not exist in earlier versions (Excel 2000) and a different strategy is needed to accomplish the same result.

Unfortunately the Excel 2000 VBA compiler barfs when it sees CommandBars.DisableCustomize. Conversely (and perhaps worse), using the code that works in 2000 leaves a gaping back door open in 2002. There appears to be no way to identify the Excel or Office version in conditional compilation directives to prevent this.

Or have I missed something?

Thanks.

Jim