ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add-in - add a custom function to a custom group. (https://www.excelbanter.com/excel-programming/402177-add-add-custom-function-custom-group.html)

Spencer Hutton

Add-in - add a custom function to a custom group.
 
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?

Niek Otten

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

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Spencer Hutton" wrote in message
...
|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?




All times are GMT +1. The time now is 01:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com