Insert Macro

A

Amber M

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!
 
D

Dave Peterson

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.
 
Top