Hi ALC
Don't know the answer but you appear to be referencing Excel Application functions ok and not VBA. So I would check in References that you have "Visual Basic for Applications" but then again I don't see how any of it would run without.
I have an over the top workaround which effectively uses the Excel function LEFT which cannot be accessed from the Application.WorksheetFunction route :
Public Sub a2()
Dim nsName As String
Dim lstrip As Integer
nsName = "NS_Project Manager"
lstrip = 3
nameleft = MLEFT(nsName, lstrip)
retNs = Worksheets("NewStarter").Cells(16, 1)
MsgBox retNs
Worksheets("NewStarter").Cells(16, 1) = ""
End Sub
Public Function MLEFT(sstr As String, nleft As Integer)
Worksheets("NewStarter").Cells(16, 1) = _
"=LEFT(" & Chr(34) & sstr & Chr(34) & "," & nleft & ")"
End Function
Hope this helps
DT