Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reference macro syntax

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
0
0
GB
I am using Access 2003

I have a macro 1 (MacroShiftData1Day) which shifts lots of data.Occasionally I want to do the shist 3 times so just run the macro 3 times using:

Sub MacroShiftData3Days()
' MacroShiftData3Days Macro
'1st Pass
Application.Run "'Balance & Cash Flow Forecasts 1.xls'!MacroShiftData1Day"
'2nd Pass
Application.Run "'Balance & Cash Flow Forecasts 1.xls'!MacroShiftData1Day"
'3rd Pass
Application.Run "'Balance & Cash Flow Forecasts 1.xls'!MacroShiftData1Day"
End Sub

However this obviously references the macro1 in this workbook name and it needs to be general as I am just setting this up as a template at moment and will have lots of differetly named copies. What syntax do I need to do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top