# Excel/VBA - Have a module call another



## AMorrison0903 (Apr 11, 2008)

Is it possible in excel to have a module automatically run another module after the execution of the first module is complete?

if so, how?

thanks.


----------



## Jimmy the Hand (Jul 28, 2006)

As far as I know, you don't run modules in Excel. You run macros (or subroutines) that are _placed on_ modules. You can run the macros in any order and you can call them from each other. E.g.


```
Sub Macro1
    'code
    'code
    'code
    Macro2   'Calling Macro2
End Sub

Sub Macro2
    'code
    'code
    'code
End Sub
```
In the above example, Macro1 calls Macro2 at the end of its own run. Theoretically, this calling hapens _before_ Macro1 is finished but, prctically, there's not much difference.

Is this what you need, or have I got it wrong.

Jimmy


----------



## Zack Barresse (Jul 25, 2004)

It would probably be less confusing to call them both from another routine...


```
Sub CallBoth()
    Call Macro1
    Call Macro2
End Sub

Sub Macro1()
    'code
End Sub

Sub Macro2()
    'code
End Sub
```
HTH


----------

