lnTop=0 scan lcName="btn"+transform(recno()) this.addobject(lcName, "commandbutton") loButton=this.getpem(lcName) with loButton .top=lntop .caption="Button # "+transform(recno()) && or something else lnTop=lnTop+.height+2 .visible=.t. endwith endscanOf course you may want to set more properties, and of course you will run out of vertical space. You may want to introduce multiple columns of buttons, if you like.