I am trying to switch these:

.Range("F" & fnFinalrowCurCol(wsDash, 6) + 1).FormulaR1C1 = "=Sum(PvtData[Cases])"
over to this:

.Range("F" & fnFinalrowCurCol(wsDash, 6) + 1).Value = Application.WorksheetFunction.Sum(PvtData[Cases])
This first code works perfectly. The new code gives me a compile error. What am I doing wrong? I thought I copied it correctly from online.