Creating a new workbook with a macro in it
Can I write a macro that creates a new workbook (using "Workbooks.Add") and then adds a macro to that new workbook?
My target is creating a workbook with a CommandButton in it. The commandButton is to execute a macro that belongs to the CommandButton's workbook, and not a macro that is on another workbook.
I know I can assign the CommandButton with
"'<workbook name>'!<macro name>"
but I want the macro assigned to the CommandButton to be created in the new workbook.