none
VBA unable to call Public Function from external Project

    Question

  • This will probably turn out to be one of those S.O.B.O. moments, but here goes . . . 

    I have a Public Function, called "GetFromAX", held within a Module , called "AXFunctions", within a Project, called "EventHandlerAddin.DOTM" , which is stored in the "\Microsoft\Word\STARTUP" folder.  (N.B. Word 2007)

    There are no Private Sub or Private Function statements anywhere within the STARTUP Project - so it is my understanding that I should be able to call my Public Function from VBA code held in another Project ( "X = GetFromAX(Parameter)" ): but I can't!  Instead I get the following message: "Compile Error: Sub or Function not defined".

    I feel as if I am missing something really obvious here.

    Several hours of internet searched have not revealed anything useful so I have decided to throw myself on your mercy.

    All suggestions / help will, as ever, be gratefully received.

    Rgds,

    Paul J

    Monday, February 21, 2011 2:19 PM

Answers