Insert Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've just seen a macro that I'd like to add into my current macro. Do I
simply copy and paste to the bottom of my current macro?

Thanks!
 
If you're lucky, that would work.

You may have to adjust variable names or even declare variable.

Another way is to keep that macro as a different subroutine and just call it:

sub yourexistingmacro()
'all your existing code
call yournewmacro
end sub

sub yournewmacro()
'all that newstuff
end sub

Change "yournewmacro" to the correct name in both spots.

And save your workbook before you test it. If it blows up real good, you can
close without saving and not lose any data.
 

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