title: Object required for WorksheetFunction
body: <p>I've got a user form with 2 drop down lists, and I'm using the values of these lists in a formula to display the results to the user. I'm having issues storing the formula result in a variable and displaying that in a message box. I have the bit of code below, but it throws an "Object required" error. I have seen some examples of formulas that put the result in a cell, but I don't need my value displayed anywhere except for the message box. Any ideas on what is causing my code to fail?</p>
  
  <pre><code>Dim selBranch As String
  Dim selSkillTitle As String
  Dim result As Variant
  
  selBranch = frmQuery.cboBranch.Value
  selSkillTitle = frmQuery.cboSkillTitle.Value
  
  result = WorksheetFunction.AverageIfs(skill_prof, branch, selBranch, skill_title, selSkillTitle)
  
  MsgBox "Query Result" &amp; vbNewLine &amp; "--------------" &amp; vbNewLine &amp; _
      "Branch: " &amp; branch &amp; vbNewLine &amp; _
      "Skill Level: " &amp; skillTitle &amp; vbNewLine &amp; vbNewLine &amp; _
      "Average Skill Proficiency: " &amp; CStr(result), vbInformation
  
  </code></pre>
  
  <p><code>skill_prof</code>, <code>branch</code>, and <code>skill_title</code> are all named ranges in my workbook. </p>