I have attached a sample workbook with the code I am using. It works well, but now I need to have it write the macro to open the new sheet and assign the macro to the button it has just created. Can anyone help please.
I have attached a sample workbook with the code I am using. It works well, but now I need to have it write the macro to open the new sheet and assign the macro to the button it has just created. Can anyone help please.
You need to set the OnAction property of the newly created button. You get this to run an existing macro which takes part of the buttons name to determine which sheet to activate.
Add this routine to a standard code module.
Alter you codePlease Login or Register to view this content.
Not all names will result in valid sheetnames so you may need to handle thatPlease Login or Register to view this content.
Works perfectly. Thank you Andy.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks