Most of us put the commandbutton on the form and leave it invisible until needed.
You can also define one with an index of 0 and create additional instances of it as needed.
The real problem with defining one on the fly...very difficult to attach program code to the "click" event.
Good Luck,