title: SetCustomUI for Custom Ribbon Error: Object Required
body: <p>I am trying to tell MS Access to load a custom ribbon when the database opens. In my struggle to get this to work, I have resorted to copying EXACTLY the examples I have found online, using their generic XML, variable names, etc. No matter what I do, the ActiveProject.SetCustomUI line throws an error, "Object Required", highlighting the string variable that holds the xml.</p>
  
  <p>Why would this be looking for an object? Firstly, the documentation shows this parameter should be a String, but also every example I can find online does the same.</p>
  
  <p>Because I know someone will ask for it:</p>
  
  <pre><code>Public Function LoadRibbon()
  Dim customUiXml As String
  
      customUiXml = "&lt;mso:customUI xmlns:mso=""http://schemas.microsoft.com/office/2009/07/customui""&gt;" &amp; _
           "&lt;mso:ribbon&gt;&lt;mso:tabs&gt;&lt;mso:tab id=""myTab"" label=""New Tab"" " &amp; _
           "insertBeforeQ=""mso:TabView""&gt;" &amp; _
           "&lt;mso:group id=""group1"" label=""New Group""&gt;" &amp; _
           "&lt;mso:button id=""button1"" label=""Test Button"" size=""large"" " &amp; _
           "imageMso=""GetExternalDataFromText"" /&gt;" &amp; _
           "&lt;/mso:group&gt;&lt;/mso:tab&gt;&lt;/mso:tabs&gt;&lt;/mso:ribbon&gt;&lt;/mso:customUI&gt;"
  
      ActiveProject.SetCustomUI (customUiXml) 'highlights "customUiXml" with the error
  
  End Function
  </code></pre>
  
  <p>I call LoadRibbon() from the Form_Load event.</p>
  
  <p>The above code is pretty much just copy/paste from an online example, but still gives me the same issues I had when I tried anything else.  What am I missing?</p>
  
  <p>Thank you in advance for your help.</p>