W
WembleyBear
Hi
I have a workbook from which I need to open 2 other workbooks seperately and
run the Print_Summary macro from within each. My problem is, each workbook
has a UserForm which loads on open for the benefit of the users of those
workbooks. My code opens the workbook OK, but the UserForm seems to stop the
rest of the code from running since if I close the UserForm manually it
continues to run as I want it to. How do I get around this problem so that
the code runs without being interupted by the UserForm loading?The form is
called frmMenuBrac and
the code I am using:
Sub Print_Budget_ALL()
Application.DisplayAlerts = False
Workbooks.Open Filename:= _
"X:\ACCOUNTS-EAST\New MA Project\Budget\2009\BracBudget.xls",
UpdateLinks:=3
Application.Run "'BracBudget.xls'!Print_Stowmarket_Summary"
Workbooks("BracBudget.xls").Close
Application.DisplayAlerts = True
End Sub
Thanks for your help
Martyn
I have a workbook from which I need to open 2 other workbooks seperately and
run the Print_Summary macro from within each. My problem is, each workbook
has a UserForm which loads on open for the benefit of the users of those
workbooks. My code opens the workbook OK, but the UserForm seems to stop the
rest of the code from running since if I close the UserForm manually it
continues to run as I want it to. How do I get around this problem so that
the code runs without being interupted by the UserForm loading?The form is
called frmMenuBrac and
the code I am using:
Sub Print_Budget_ALL()
Application.DisplayAlerts = False
Workbooks.Open Filename:= _
"X:\ACCOUNTS-EAST\New MA Project\Budget\2009\BracBudget.xls",
UpdateLinks:=3
Application.Run "'BracBudget.xls'!Print_Stowmarket_Summary"
Workbooks("BracBudget.xls").Close
Application.DisplayAlerts = True
End Sub
Thanks for your help
Martyn