Macro calling macros then not running additional macros?

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
120
Office Version
  1. 365
Platform
  1. MacOS
So I have multiple macros to keep things clean. It may be extra macros but it help in case files change etc.

I have a master 'CallMacros' macro assigned to a button

Clicking this button, calls 11 macros, let's call them Macro1, Macro2, Macro3, etc.

Each macro is:

Workbooks.open (a predefined sheet, each macro1, macro2 calls a corresponding sheet)
Application.run (Calls a macro in each of the above sheets, some of the basic functions of these macros are to update links, save, email, and close that file...)

BUT, it stops after macro1. Macro2 never runs. It never completes the CallMacro...

Any help?

Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
No, all you showed was what macros were being called.
There was no actual code.
Your best bet is to step through your code as I outlined in my previous post
 
Upvote 0
So I did just that and it processes all of the 'Burris' including opening, and closing the spreadsheet, and when it returns to the foreground sheet, it just stops on Burris. It never returns to START macro, to process the Garrison macro.

Thanks
 
Upvote 0
When you say
it just stops on Burris
do you mean that the line in red below, is highlighted in yellow?
Code:
Sub Start()

[COLOR=#ff0000]Burris[/COLOR]
Garrison
Selesky
Navarre
Ohlenbusch
Preston
Price
Prievo
Stahl
Young
Wilson
Master_Stale

End Sub
 
Upvote 0
Correct. And no further. Well, actually Stepping into it... It repeats Burris again if I continue to Step-Into...

Everything up to that point, is flawless, including running everything on the Burris Workbook.

Thanks
 
Upvote 0
Could you post the last code run in the Burris file, which from post#8, looks to be the CloseandSave macro.
 
Upvote 0
Sub CloseandSave()
ActiveWorkbook.Close SaveChanges:=True
End Sub


That's it...
 
Upvote 0
Not sure why that's happening.
This shouldn't make any difference, but worth a shot.
Change your start macro to this & see what happens
Code:
Sub Start()

    Call Burris
    MsgBox "Burris done"
    Call Garrison
    MsgBox "Garrison done"
    Selesky
    Navarre
    Ohlenbusch
    Preston
    Price
    Prievo
    Stahl
    Young
    Wilson
    Master_Stale

End Sub
 
Upvote 0
Ok.
Change the CallsendMacros to this
Code:
Sub CallSendMacros()
UpdateLinks
HideColumns
apply_autofilter_across_worksheets
MAIL_TO_TECHNICIAN

End Sub
& then change the Start macro to
Code:
Sub Start()

    Call Burris
    Workbooks("Michael Burris.xlsm").Close True
    Call Garrison
    Selesky
    Navarre
    Ohlenbusch
    Preston
    Price
    Prievo
    Stahl
    Young
    Wilson
    Master_Stale

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top