Thanks to all of you for your help. In the meantime I have found that this helps: repeat with p=the number of menuItems of btn XX down to 1 delete menuItem p of btn XX end repeat I repeat, thanks and regret the inconvenience. Ton