I have a macro which registers my user-defined functions, places them in custom categories and supplies descriptions, called AddUDFsToCategory. This macro is placed in a module in an add-in I have installed. However, for the UDFs to become registered, I have to run the macro manually every time I open Excel.
I want this macro to run when I open Excel, even though no workbook is open. I tried to use the Workbook_AddinInstall in the "ThisWorkbook" section of the addin,
Private Sub Workbook_AddinInstall()
AddUDFsToCategory
End Sub
but that doesn't seem to achieve anything.
If I try to use it with Workbook_open,
Private Sub Workbook_Open()
AddUDFsToCategory
End Sub
I get:
"Run-time error '1004': Cannot edit a macro on a hidden workbook. Unhide the workbook using the Unhide command."
Does anyone know how to get around this?



