Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default include macros in another macro

i have a macro where i create literals based on a date scheme.

i want to use that in several other macros and not key the code each time
because if i have to make a change, i have to go to 20 programs. these
programs generate month end reports that have a date literal as part of the
heading.

how do i include the 'date macro' in the others and then continue with the
processing of the macro that now has the datemacro embedded.

i was looking for an include statement but do not find.

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default include macros in another macro

Sub Macro1()
Msgbox "Macro1"
' some code
Macro2
End Sub

Sub Macro2()
Msgbox "Macro2"
' some code
Macro3
Macro4
End Sub

Sub Macro3()
Msgbox "Macro3"
' some code
End Sub

Sub Macro4()
Msgbox "Macro4"
' some code
End Sub

Regards

Trevor


"jnewl" wrote in message
...
i have a macro where i create literals based on a date scheme.

i want to use that in several other macros and not key the code each time
because if i have to make a change, i have to go to 20 programs. these
programs generate month end reports that have a date literal as part of
the
heading.

how do i include the 'date macro' in the others and then continue with
the
processing of the macro that now has the datemacro embedded.

i was looking for an include statement but do not find.

thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default include macros in another macro


declare your date macro as
public sub datemacro()
and then call this macro within your code of the other macro.

jnewl Wrote:
i have a macro where i create literals based on a date scheme.

i want to use that in several other macros and not key the code each
time
because if i have to make a change, i have to go to 20 programs. these
programs generate month end reports that have a date literal as part of
the
heading.

how do i include the 'date macro' in the others and then continue with
the
processing of the macro that now has the datemacro embedded.

i was looking for an include statement but do not find.

thanks



--
kwiklearner
------------------------------------------------------------------------
kwiklearner's Profile: http://www.excelforum.com/member.php...o&userid=31909
View this thread: http://www.excelforum.com/showthread...hreadid=521904

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
modify macro to include more tabs teh_chucksta Excel Discussion (Misc queries) 1 March 11th 10 09:00 PM
can macros include page setup functions? junebug Excel Discussion (Misc queries) 1 September 4th 08 04:15 PM
How do I include a date input box in a macro? Project Mgr Excel Discussion (Misc queries) 6 June 19th 08 04:52 PM
How do I include a date input box in a macro? Project Mgr[_2_] Excel Discussion (Misc queries) 0 June 19th 08 04:21 PM
Macro to include contents of cell Matt Excel Discussion (Misc queries) 1 November 15th 05 03:51 AM


All times are GMT +1. The time now is 03:07 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"