Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Run macros macro
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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200702/1 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Run macros macro
try just taking out the workbook reference, i.e.
Application.Run "CBcellformat" Hope this helps, -Chad "blazzzercat via OfficeKB.com" wrote: 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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200702/1 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Run macros macro
Works great thanks!
Chad wrote: try just taking out the workbook reference, i.e. Application.Run "CBcellformat" Hope this helps, -Chad 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 [quoted text clipped - 18 lines] Columns("J:J").EntireColumn.AutoFit End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200702/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enable Macros with a Macro! | Excel Discussion (Misc queries) | |||
Macro warning even though macros have been removed. | Excel Discussion (Misc queries) | |||
Macro Msg. when file has no macros | Excel Worksheet Functions | |||
Excel says macro, but no macros present? | Excel Discussion (Misc queries) | |||
macro warning - but no macros | Excel Discussion (Misc queries) |