Question about merging macros

G

Greegan

I have a custom menu with specific macros I've recorded (or ones you folks
have been helpful in providing).
Say one formats Zip Codes for a 5-digit format, and another fills a blank
column with a default country code of "US", and there are others as well...

Now what I've been doing, as my work requires, is to copy and paste perhaps
both or more macro commands into new macros.

The end result is that when I'm trying to fix an error, change a value, or
create a new one using all or part of the two macros (for this example) into
a new command (say I want to change the new macro to include "CA" for
Canada's country code) I have to scroll through a lot of text before I find
what I'm looking for...

My question is... is there a way to reference another macro command without
having to copy the complete text into (the new) another macro?

Thanks in advance...
G
 
V

Vasant Nanavati

Not sure exactly what you mean, but you can call a macro from another macro
as follows:

Sub Macro1()
Call Macro2
End Sub

The Call keyword is optional and can be omitted; I like to use it for
clarity.
 
B

Bob Phillips

In the module code pane, click on the dropdown at the top right of the pane,
and you will see a list of the macros in that module.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Similar Threads

Macros 2
Ending in Macros 4
Combine macros variable help 2
Macros and If 4
numbers and macros 4
Using Macros 3
Q about exporting macros 2
Macros 7

Top