I have a listbox in my form that has 4 coluns showing name,code,price of produtcs. then I have 45 command button in the form "cmditem1 .. to cmditem45". What Im trying to do is: i need to read the listbox and then rename the caption of the buttons command to the product name like:
cmditem1.caption = listaproduto.Column(1, 0)
so with that I have rename the caption of one button to the fist name of product in the list box. great! but now,how can I do a loop or whatever to rename the caption the rest of the buttons with the rest of the products names because I dont want to repeat that for each one.