+ Reply to Thread
Results 1 to 4 of 4

VBA now not recognising Functions such as Right(

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    Dorset
    MS-Off Ver
    Excel 365
    Posts
    37

    VBA now not recognising Functions such as Right(

    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."

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: VBA now not recognising Functions such as Right(

    Check Tools - References in the VB Editor. At least one of them will be flagged as 'MISSING:' so you'll need to fix that problem.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    11-18-2011
    Location
    Dorset
    MS-Off Ver
    Excel 365
    Posts
    37

    Re: VBA now not recognising Functions such as Right(

    Thank you, Rorya - that seems to solve PART of that challenge - there were several such MISSING.

    I would NEVER have found that by myself !

    These are the ones that ar ticked -

    Visual Basic For Applications
    Microsoft Excel 16.0 Object Library
    OLE Automation
    Microsoft Office 16.0 Object Library
    Microsoft Forms 2.0 Object Library
    Microsoft VBA Extensibility
    Microsoft Scripting Runtime
    ... and my own AddIn Library

    Your remedy solves the "FUNCTION" part - but, Alas ! - in the VBA Worksheet section, I have this -

    Private Sub CommandButton1_Click()

    ThisWorkbook.DoIt
    DoIt

    End Sub

    ... which points to a Subroutine in the "ThisWorkBook" Module - but neither command works !

    "Sub or Function not defined"

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: VBA now not recognising Functions such as Right(

    Is it public?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Recognising cell format color in functions?
    By peasther in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2014, 05:17 PM
  2. [SOLVED] Recognising Conflicts
    By bananas123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-24-2014, 10:38 AM
  3. [SOLVED] Not recognising dates
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2014, 12:51 PM
  4. Macro not recognising changes
    By grey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 05:20 AM
  5. Drop down not recognising
    By stevesunfold in forum Excel General
    Replies: 2
    Last Post: 11-24-2008, 04:09 PM
  6. Recognising the first non-zero value over 13 columns
    By Tricia in forum Excel General
    Replies: 2
    Last Post: 07-10-2008, 01:33 AM
  7. Not recognising two values are the same
    By Big Mark in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2008, 07:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1