quasi_modo:
Does anyone have an idea how to remove the horizontal rectangle?Do While Not ele Is Nothing
Your code is possibly too inclusive. It's going to calculate, in dynamics, as many rectangles as there are elements next to the cursor.
Perhaps you should exit the loop when the first rectangle has been created.