flashgordie
Board Regular
- Joined
- Jan 9, 2008
- Messages
- 95
- Office Version
- 365
- Platform
- Windows
Hello All,
I have 9 macros that function correctly on their own.
I would like to create a single macro that would run each of the individual macros in order without jumping a head.
“When they are combined (as shown below) into a single “RunAll” Macro, A through F work as expected. However H doesn’t wait unit G is complete. As G provides information that H needs to function, H throughs an error. “I” completes as expected. In the end I’m left with G and H not finishing. I expect this is because, once G starts, it then tries to execute H. As G takes longer, H starts looking for information that hasn’t been produced in time.
I am looking for help. I would like the subs to execute not only one after the other, but wait until the previous one is complete. Any ideas? Thanks!
Sub RunAll_Adj_Macros()
Call Adj_A_Insert_Run_date
Call Adj_B_Convert_Text_to_Numbers
Call Adj_C_Insert_Period_YOY
Call Adj_D_Insert_Period_YTD
Call Adj_E_Insert_Reporting_Qty
Call Adj_F_Insert_CostAmountActual_per_unit
Call Adj_G_Insert_SalesAmountActual_per_unit
Call Adj_H_Insert_Margin_Percentage
Call Adj_I_Convert_To_DollarFormat
End Sub
I have 9 macros that function correctly on their own.
I would like to create a single macro that would run each of the individual macros in order without jumping a head.
“When they are combined (as shown below) into a single “RunAll” Macro, A through F work as expected. However H doesn’t wait unit G is complete. As G provides information that H needs to function, H throughs an error. “I” completes as expected. In the end I’m left with G and H not finishing. I expect this is because, once G starts, it then tries to execute H. As G takes longer, H starts looking for information that hasn’t been produced in time.
I am looking for help. I would like the subs to execute not only one after the other, but wait until the previous one is complete. Any ideas? Thanks!
Sub RunAll_Adj_Macros()
Call Adj_A_Insert_Run_date
Call Adj_B_Convert_Text_to_Numbers
Call Adj_C_Insert_Period_YOY
Call Adj_D_Insert_Period_YTD
Call Adj_E_Insert_Reporting_Qty
Call Adj_F_Insert_CostAmountActual_per_unit
Call Adj_G_Insert_SalesAmountActual_per_unit
Call Adj_H_Insert_Margin_Percentage
Call Adj_I_Convert_To_DollarFormat
End Sub