IMO it should be used as little as possible. I think it makes the code hard
to read. VBA has plenty of loops and condition statements that make
excessive use of Goto unnecessary.
The only time I use it is to set up an ErrorHandler or CleanUp procedure,
which can not only trap an error and decide what to do (resume or exit or
something else), but can also reset any Application settings the macro may
have changed, such as setting Calc to manual. If an error occurs somewhere
in the middle of the code, I usually want the calc set back to automatic
before exiting the procedure.
On Error GoTo ErrorHandler
"MC82" wrote:
I sometimes see people seperating their code into many different
subroutines then joining it together with goto ____. What is the
purpose of this? Will it slow down or make the macro faster? or is it
used just for organization purposes?
--
MC82
------------------------------------------------------------------------
MC82's Profile: http://www.excelforum.com/member.php...o&userid=18682
View this thread: http://www.excelforum.com/showthread...hreadid=540083