View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default how to call subprocedure from within procedure?

Can't stop before executing this, at least not without an error. Perhaps you
have error handling that suppresses the error, either in main code or in
subroutine. Would need to see more of the code and know why you say it stops
before the sub - how do you know?

Try putting a breakpoint in the sub and you will find out if it is being
executed or not when it brings you into the debugger. Then maybe you can
find out what is happening.
--
- K Dales


"dreamz" wrote:


i'm coding a dialog that has 2 different selection methods, but the
calculation is the same for both (i.e. different inputs, same
calculation method).

i'm trying to streamline it by creating one section called private sub
calculate(), and then calling this at the end of the other procedures.
this is in the same userform as the other ones.

i typed:


Code:
--------------------
call calculate
--------------------


at the end of both procedures, and only one of my selection methods
worked. the other appears to stop just before the procedure call (stops
at the last step before it).

what happened?

thanks.


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=480621