View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Williams Charles Williams is offline
external usenet poster
 
Posts: 968
Default displaying intermediate results from a function procedure

A function that is called from a cell can only return a valaue to the
calling cell and is not allowed to modify any other cell.

If you want to see the intermediate values you could:
- add Debug.Print statements to write values to the Immediate Window
- or show the locals window and add a breakpoint to the the function
- add MsgBox statements to the function

regards
Charles

Is there a way to write out to a worksheet intermediate (internal) variables
that are calculated in a function procedure. I have tried writing a sub
procedure that is called from the function procedure but that doesn't seem to
work. Makes the calling function not work and I get a #VALUE instead. In
that iteration, I was trying to print to the same worksheet that I am calling
the function procedure from,

Thanks