title: Register user-defined functions in excel addin automatically
body: <p>I have a macro which registers my user-defined functions, places them in custom categories and supplies descriptions, called <code>AddUDFsToCategory</code>. 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.</p>
  
  <p>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,</p>
  
  <pre><code>Private Sub Workbook_AddinInstall()
      AddUDFsToCategory
  End Sub
  </code></pre>
  
  <p>but that doesn't seem to achieve anything.</p>
  
  <p>If I try to use it with Workbook_open,</p>
  
  <pre><code>Private Sub Workbook_Open()
      AddUDFsToCategory
  End Sub
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>"Run-time error '1004': Cannot edit a macro on a hidden workbook. Unhide the workbook using the Unhide command."</p>
  </blockquote>
  
  <p>Does anyone know how to get around this?</p>