Macro can't find function

  • Thread starter Thread starter dbqstamp
  • Start date Start date
D

dbqstamp

I am using ther RunCode option in a macro to execute a function. The function
exists in a module in the same database as the macro. There are paranthesees
following the function. When I try tp run the macro the message "The
expression you entered has a function name that Microsoft Office Access can't
find" appears. In the Function Name area of the macro I used the ... to find
the function when I created the macro. Why can't the macro find the function
when it runs??
 
Also make sure that the Function is actually a Function and not a
Sub...IIRC, RunCode will only work on Functions.



Rob
 
If you mean Public as in "Public Function NameOFFunction()" it is that way.
Thanks.
 
It is a Function. Thanks.

Robert Morley said:
Also make sure that the Function is actually a Function and not a
Sub...IIRC, RunCode will only work on Functions.



Rob
 
Two more thoughts on this:

First, is there a chance that you've got identical function names or you're
using a reserved word for the function? Perhaps RunCode is having
difficulty properly resolving it. Try changing it to something totally
guaranteed to be unique and not reserved like "zxqw", or something of that
nature.

Second, if the above has no effect, what happens if you cut & paste the code
to a new module? (Note: Cut & Paste only, do NOT Export & Import.)


Rob
 
Back
Top