Add-in - add a custom function to a custom group.

S

Spencer Hutton

I have an Add-in that contains several custom functions. i want to add them
to a custom function category group named "MyFunctions". Here is the code i
have that runs with the Workbook_Open event.

Sub AddFunctionsToCategory()
Application.MacroOptions Macro:="FUNCNAME", Description:="Function Desc",
Category:= "MyFunctions"
End Sub

However, when the add-in loads, i receive a run-time error 1004 "Cannot edit
a mcaro on a hidden workbook" the .xla file is set to IsAddIn = True and i
dont want to unhide/rehide it with VBA before it loads. what is the answer?
 
N

Niek Otten

Look here:

http://www.jkp-ads.com/Articles/RegisterUDF00.htm

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I have an Add-in that contains several custom functions. i want to add them
| to a custom function category group named "MyFunctions". Here is the code i
| have that runs with the Workbook_Open event.
|
| Sub AddFunctionsToCategory()
| Application.MacroOptions Macro:="FUNCNAME", Description:="Function Desc",
| Category:= "MyFunctions"
| End Sub
|
| However, when the add-in loads, i receive a run-time error 1004 "Cannot edit
| a mcaro on a hidden workbook" the .xla file is set to IsAddIn = True and i
| dont want to unhide/rehide it with VBA before it loads. what is the answer?
 

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