B
Brett
I'm using the following sub from here from here
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#RunSubFromActiveCell.
RunSubFromActiveCell (#RunSubFromActiveCell)
This one is kind of like have a command button or a menu item, but
using a cell instead to identify the macro to be run. Created this
one to relate to the macros near here. Most of my macros require a
preselected area first so expect this to be of limited use. Also see
Alt+F8 and MacroDialogBox in my Toolbars page.
Sub RunSubFromActiveCell()
Application.Run ActiveCell.Value
End Sub
Examples of content for Activecell:
mymacro
personal.xls!mymacro
I don't use another workbook (.xls file). Everything is in the same
workbook. I believe the above sub should work with one named
InsertRowsAndFillFormulas()
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#RunSubFromActiveCell.
I click the run button and try to run RunSubFromActiveCell() but get
the message Run-time error '1004':
The macro 'Cell' cannot be found
Both of the above subs are in Module1, a standard module as suggested.
I want a user to insert a row and retain the formulas. I'm not sure
how this should be invoked (button or some other method). Either way,
it isn't invoking. What am I doing wrong?
Thanks,
Brett
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#RunSubFromActiveCell.
RunSubFromActiveCell (#RunSubFromActiveCell)
This one is kind of like have a command button or a menu item, but
using a cell instead to identify the macro to be run. Created this
one to relate to the macros near here. Most of my macros require a
preselected area first so expect this to be of limited use. Also see
Alt+F8 and MacroDialogBox in my Toolbars page.
Sub RunSubFromActiveCell()
Application.Run ActiveCell.Value
End Sub
Examples of content for Activecell:
mymacro
personal.xls!mymacro
I don't use another workbook (.xls file). Everything is in the same
workbook. I believe the above sub should work with one named
InsertRowsAndFillFormulas()
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#RunSubFromActiveCell.
I click the run button and try to run RunSubFromActiveCell() but get
the message Run-time error '1004':
The macro 'Cell' cannot be found
Both of the above subs are in Module1, a standard module as suggested.
I want a user to insert a row and retain the formulas. I'm not sure
how this should be invoked (button or some other method). Either way,
it isn't invoking. What am I doing wrong?
Thanks,
Brett