Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Greegan
 
Posts: n/a
Default Question about merging macros

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   Report Post  
Vasant Nanavati
 
Posts: n/a
Default

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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
question macros wnl2007 Excel Worksheet Functions 1 June 10th 05 10:56 PM
Enable macros automatically for a workbook Diane Alsing Excel Discussion (Misc queries) 4 February 16th 05 05:48 PM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
The available macros list in XL; how to suppress filename from showing KR Excel Discussion (Misc queries) 1 January 10th 05 07:20 PM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"