View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Greg Lovern[_3_] Greg Lovern[_3_] is offline
external usenet poster
 
Posts: 5
Default MacroOptions doesn't stick

I have an add-in with custom functions. I'm trying to use MacroOptions to
add descriptions for them in the Insert Function dialog, and to create
custom categories for them, and put them in the custom categories.

It works fine if I just run the code and then look at the Insert Function
dialog. But if I exit and restart Excel (2003), the custom category is gone
and the custom function is listed in the Engineering category (I have no
idea why it gets put there).

I tried putting the code in the Workbook_AddinInstall event, and unchecking
the Add-in from the Add-Ins dialog and then rechecking it. Again, works fine
until I restart Excel, then it's back to the same problem.

I tried the putting it in the Workbook_Open event, but that gives me an
error message about not being able to edit a hidden workbook. I tried
putting it in the main module's auto_open (which otherwise works fine), but
it doesn't seem to do anything there.

Any idea what I need to do differently? My code is like this:

Application.MacroOptions "MyFunction", "This is the description for
MyFunction.", , , , , "My Category"


Thanks,

Greg