The function seems to work fine when called from a worksheet; the arguments are supplied.
When you call it from another macro you need to supply valid arguments too.
Try the likes of:
Code:
Public Sub ViewPrjByMth()
Dim strField As String, pMonth As Date, amt
pMonth = DateValue("1-Feb-2019")
strField = "Army"
'Worksheets("PrjByMth").Visible = True
'Sheets("PrjByMth").Activate
amt = PrjByMonth(strField, pMonth)
MsgBox amt & ", " & strField & ", " & pMonth
End Sub
The variables don't need to be global.