Why, oh, Why, does VBA now not recognise Functions such as Right( or Range( ?

I have a "button" on the spreadsheet, that initiates this sub-routine :-

Private Sub CommandButton1_Click()
ThisWorkbook.DoIt
DoIt
End Sub

... and neither will work, to run that Subroutine that sits in the "ThisWorkbook" Page. It just tells me that "Can't find project or library".

If I go to that Subroutine, and press F8, the heading is highlighted, but again, it refuses to run, giving me that same message for words such as Right( or Range(

Not even when prefaced by "WorksheetFunction."