Running macro

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

While I am running a macro (say "A"), how can I jump to
another macro (say "B") and start from a specific location
in macro B? (macro B is associated with another sheet).
thanks.
 
you should use procedures to jump to. if you design your
code in smaller reuseable chunks, you can make the jumps
in a controled manner.


Sub Test()
call ProcA
... more code here

.... another jump or just exit procedure.
end sub

Sub ProcA()
call ProcB
end sub

Sub ProcB()
Msgbox "help"
end sub
 
Hi,

My "MacroA" and "MacroB" belong to different sheets (i.e.,
sheet1.MacroA and sheet2.MacroB). How can I make
the "Marker" defined in MacroA available to MacroB?
thanks much.
-----Original Message-----
Perhaps something like that below.
Macro A assigns a value to a marker, which is looked for
at the start of macro B - and if found - jumps to the goto
location.
This is not the best / purest way of doing it but it
answers your question directly.
 

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