call function from another wb : problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
This is the situation

Function UpdateMb

<instructions>
application.run(<workbookname!<modulename>.<functionname>())
<instructions>

End function

When the application.run cmd is running, there is no runtime error. However
the function UpdateMb is rerun immediately without having run the function
from the other wb.

Thanks for your help
Francois.
 
Hi Francois,

Have you tried stepping through your code. Put a break point F9 on the first
line in UpdateMb, or the single statement "Stop" without quotes. When the
code stops press Ctrl-L to see what called the function. Step through with
F8 or run to the next break or stop statement with F5. (Also look at Ctrl
F8, Shift F8 & Ctrl+Shift F8)

Off topic - did you sort out the problem you posted a while ago re showing
an Application.Dialog called from Macro-5 dialogsheet code.

Regards,
Peter T
 
Also - it didn't occur to me this might be a UDF. If it is, include the
following line just before the break point:

Debug.Print Application.Caller.Address

Ctrl-G to see the Immediate window.

Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top