B
blazzzercat via OfficeKB.com
I recorded the following macro to run three other macros. The code references
a particular workbook name. How do I change that so it will run in any
workbook
Thanks so much.
Sub CBRunMacros()
'
' CBRunMacros Macro
'
'
Application.CutCopyMode = False
Application.Run "'DFC MUSA AR Credit Balances 013107.xls'!CBcellformat"
Application.Run _
"'DFC MUSA AR Credit Balances 013107.xls'!mcrInsertTwoRowsOnEmpty"
Application.Run "'DFC MUSA AR Credit Balances 013107.xls'!CBSubtotal"
Columns("F:F").EntireColumn.AutoFit
Columns("G:G").EntireColumn.AutoFit
Columns("I:I").EntireColumn.AutoFit
Columns("J:J").EntireColumn.AutoFit
End Sub
a particular workbook name. How do I change that so it will run in any
workbook
Thanks so much.
Sub CBRunMacros()
'
' CBRunMacros Macro
'
'
Application.CutCopyMode = False
Application.Run "'DFC MUSA AR Credit Balances 013107.xls'!CBcellformat"
Application.Run _
"'DFC MUSA AR Credit Balances 013107.xls'!mcrInsertTwoRowsOnEmpty"
Application.Run "'DFC MUSA AR Credit Balances 013107.xls'!CBSubtotal"
Columns("F:F").EntireColumn.AutoFit
Columns("G:G").EntireColumn.AutoFit
Columns("I:I").EntireColumn.AutoFit
Columns("J:J").EntireColumn.AutoFit
End Sub