How to i add code to a Command button that I created in VBA.
Posted on 2009-12-23
so I have a button that adds a new sheet to the current work book.
it asks the user for the name of the sheet.
it thens creates the sheet as the last sheet in the work book.
along with this one the first page (sort of like an index page, it adds the name of the sheet in one cell, and in the next cell i would like to create a button that will link to that sheet.
1) how do I create the button on the same row as the sheet name was added
2) I have created the button, but I would like to assign code to this button dynamically when its created. I have the code that I manually entered for the other buttons on my page but would like to know how could I do this via vba code at the time of creation of the button