Error Can't find procedure name

  • Thread starter Thread starter Jim Shaw
  • Start date Start date
J

Jim Shaw

BlankI have a module "modUtility" which contains a Public Function
"ShowAllControls()".
I'm trying unsuccessfully to run ShowAllControls in a Macro statement.
I keep getting an error message "Error Can't find procedure name..."
I've tried using RunCode, OpenModule, etc. Nothing works.
I've even cut and pasted the function name into the macro argument.
Can anyone give me a clue here?


Thanks
Jim
 
Jim,

Instead of typing in the function name, try to invoke the builder by
clicking on the little button that appears on the right of the function
name argument box of the RunCode action in the query. If it's a
spelling/syntax mistake (like if you are enclosing it in quotes while
you shouldn't) this will fix it.

HTH,
Nikos
 
Jim,

With a RunCode macro, I think this should work if you just put this in
the Function Name argument...
ShowAllControls()

Is this what you have done? Is it possible that the ShowAllControls
function calls another procedure, and this is where the problem lies?
Does the ShowAllControls procedure work if you try to run it
independently, i.e. not via the macro?
 
Nikos
I tried using the builder and it worked. I don't understand why it didn't
work when I cut and pasted the function name from the VBA/IDE. The two
approaches resulted in names that syntactically looked identical.
Thanks
Jim
 
Steve;
I did what you suggested and it didn't work. Using the builder did work
however.
I had it running independently before I tried to call it from a macro
ShowAllControls does not call another procedure, however, is that not a
good thing to do??!! I'm not aware of that restriction.
Thanks
Jim
 
Jim,

Like you, I am puzzled at your experience here.

Regarding the calling of another procedure, I was not implying that it
is not a good thing to do. I only wondered, if there was one, whether a
misspelling or some such may have accounted for the error you were seeing.
 
Back
Top