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

  • Question

  • 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.But when I go to thet Subroutine, and press F8, the heading is highlightedbut it refuses to run, telling me that "Can't find project ot library" for words such as  Right( or Range(       Not even when prefaced by WorksheetFunction.







    Monday, November 11, 2019 12:55 PM

All replies

  • Select Tools > References... in the Visual Basic Editor.

    The references that are in use are listed at the top, with their check box ticked.

    Does any of these start with MISSING: ? If so, that is probably the culprit. Clear its check box, then click OK.

    Now select Debug > Compile VBAProject to see if the problem has gone.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, November 11, 2019 1:05 PM