MSGBOXes in user defined function

B

Bob_Irving

Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel If I insert MSGBOXes in a user defined function for debugging, they show up twice (at least!), once with zero or blank values (as appropriate) and again with correct values? Why?
 
J

JE McGimpsey

Version: 2004
Operating System: Mac OS X 10.6 (Snow Leopard)
Processor: Intel

If I insert MSGBOXes in a user defined function for debugging, they show up
twice (at least!), once with zero or blank values (as appropriate) and again
with correct values? Why?

WIthout seeing your UDF, it's hard to be definitive, but it almost
certainly means that the function is being called multiple times during
a single worksheet calculation. This can happen if the function declares
itself to be volatile (e.g., Application.Volatile = True) or if it's
self-referential.

Post your UDF, along with relevant details about your worksheet and we
can be more precise.
 

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

Top