Whats the VBA for adding a command button and assigning a macro to it?
For example, I have a macro that adds new sheets to my workbook. I'd like to incorporate into that macro the step of adding a command button to the new sheet and assigning a macro to that button which hides the sheet.
I know the VBA for hiding sheets but I can't figure out how to add the button and assign the macro to it.
Thanks for any help!
For example, I have a macro that adds new sheets to my workbook. I'd like to incorporate into that macro the step of adding a command button to the new sheet and assigning a macro to that button which hides the sheet.
I know the VBA for hiding sheets but I can't figure out how to add the button and assign the macro to it.
Thanks for any help!