G
Guest
Hi,
I have lengthy vba function which works perfectly fine when run from the
code viewer. I have a macro which launches this function (using Runcode),
which again works perfectly when run by itself.
However: when I attatch this macro to a button on a form (in order to run
the vba function from a form...) this does NOT work, and produces the
following error:
"Procedure declaration does not match description of event or procedure
having the same name."
Can anyone help with this?
Now, I have had a look about on here and other forums for a solution, but
found nothing very helpful; the consensus seems to be that there might be an
ill-defined variable/ argument in the vba function - which I cannot find in
my code. I find this an unlikely solution in any case, as the function runs
fine when run independently of the form, either on its own or when launched
in the macro. Thoroughly confused, and help (or alternatives) greatly
appreciated!
I have lengthy vba function which works perfectly fine when run from the
code viewer. I have a macro which launches this function (using Runcode),
which again works perfectly when run by itself.
However: when I attatch this macro to a button on a form (in order to run
the vba function from a form...) this does NOT work, and produces the
following error:
"Procedure declaration does not match description of event or procedure
having the same name."
Can anyone help with this?
Now, I have had a look about on here and other forums for a solution, but
found nothing very helpful; the consensus seems to be that there might be an
ill-defined variable/ argument in the vba function - which I cannot find in
my code. I find this an unlikely solution in any case, as the function runs
fine when run independently of the form, either on its own or when launched
in the macro. Thoroughly confused, and help (or alternatives) greatly
appreciated!