Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
modify macro to include more tabs | Excel Discussion (Misc queries) | |||
can macros include page setup functions? | Excel Discussion (Misc queries) | |||
How do I include a date input box in a macro? | Excel Discussion (Misc queries) | |||
How do I include a date input box in a macro? | Excel Discussion (Misc queries) | |||
Macro to include contents of cell | Excel Discussion (Misc queries) |