Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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 |
#2
![]() |
|||
|
|||
![]()
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. -- Vasant "Greegan" wrote in message ... 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 |
#3
![]() |
|||
|
|||
![]()
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) "Greegan" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
question macros | Excel Worksheet Functions | |||
Enable macros automatically for a workbook | Excel Discussion (Misc queries) | |||
Enabling macros | Excel Discussion (Misc queries) | |||
Transferring toolbars and macros to other computers | Excel Discussion (Misc queries) | |||
The available macros list in XL; how to suppress filename from showing | Excel Discussion (Misc queries) |