>I want to create a number of buttons every time a user resizes that form.
>The number of buttons is different every time.
I'm not quite sure why you would want to do this, so this may not be useful, but perhaps you could maintain the Command Buttons you added to teh form by storing them in an array property on the form (you can use the EVALUATE() function to put them in there).
It could look something like:
this.AddObject(objectName, 'commandbutton')
this.aButtons[1] = EVAL('thisform.' + objectName)
Now just scan through the array to address the buttons.